acme-sh: refactor

Also, add some more meta info.
This commit is contained in:
AndersonTorres 2022-01-02 09:51:52 -03:00
parent f4cdc93ef2
commit 697b6d85ae
3 changed files with 78 additions and 45 deletions

View file

@ -0,0 +1,77 @@
{ lib
, stdenv
, fetchFromGitHub
, coreutils
, curl
, dnsutils
, gnugrep
, gnused
, iproute2
, makeWrapper
, openssl
, socat
, unixtools
}:
stdenv.mkDerivation rec {
pname = "acme.sh";
version = "3.0.0";
src = fetchFromGitHub {
owner = "Neilpang";
repo = "acme.sh";
rev = version;
sha256 = "sha256-KWSDAHzvNl8Iao13OV/ExRoKqkc9nouWim+bAN1V+Jo=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = let
binPath = lib.makeBinPath [
coreutils
curl
dnsutils
gnugrep
gnused
openssl
socat
(if stdenv.isLinux then iproute2 else unixtools.netstat)
];
in
''
runHook preInstall
mkdir -p $out $out/bin $out/libexec
cp -R $src/* $_
makeWrapper $out/libexec/acme.sh $out/bin/acme.sh \
--prefix PATH : "${binPath}"
runHook postInstall
'';
meta = with lib; {
homepage = "https://acme.sh/";
description = "A pure Unix shell script implementing ACME client protocol";
longDescription = ''
An ACME Shell script: acme.sh
- An ACME protocol client written purely in Shell (Unix shell) language.
- Full ACME protocol implementation.
- Support ECDSA certs
- Support SAN and wildcard certs
- Simple, powerful and very easy to use. You only need 3 minutes to learn it.
- Bash, dash and sh compatible.
- Purely written in Shell with no dependencies on python.
- Just one script to issue, renew and install your certificates automatically.
- DOES NOT require root/sudoer access.
- Docker ready
- IPv6 ready
- Cron job notifications for renewal or error etc.
'';
license = licenses.gpl3Only;
maintainers = teams.serokell.members;
inherit (coreutils.meta) platforms;
};
}

View file

@ -1,44 +0,0 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, curl, openssl, socat, iproute2,
unixtools, dnsutils, coreutils, gnugrep, gnused }:
stdenv.mkDerivation rec {
pname = "acme.sh";
version = "3.0.0";
src = fetchFromGitHub {
owner = "Neilpang";
repo = "acme.sh";
rev = version;
sha256 = "sha256-KWSDAHzvNl8Iao13OV/ExRoKqkc9nouWim+bAN1V+Jo=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out $out/bin $out/libexec
cp -R $src/* $_
makeWrapper $out/libexec/acme.sh $out/bin/acme.sh \
--prefix PATH : "${
lib.makeBinPath [
coreutils
gnugrep
gnused
socat
openssl
curl
dnsutils
(if stdenv.isLinux then iproute2 else unixtools.netstat)
]
}"
runHook postInstall
'';
meta = with lib; {
description = "A pure Unix shell script implementing ACME client protocol";
homepage = "https://acme.sh/";
license = licenses.gpl3;
maintainers = teams.serokell.members;
};
}

View file

@ -858,7 +858,7 @@ with pkgs;
accuraterip-checksum = callPackage ../tools/audio/accuraterip-checksum { };
acme-sh = callPackage ../tools/admin/acme.sh { };
acme-sh = callPackage ../tools/admin/acme-sh { };
acousticbrainz-client = callPackage ../tools/audio/acousticbrainz-client { };