1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
{ lib
, stdenv
, fetchFromGitHub
, coreutils
, curl
, dnsutils
, gnugrep
, gnused
, iproute2
, makeWrapper
, openssl
, socat
, unixtools
}:
stdenv.mkDerivation rec {
pname = "acme.sh";
version = "3.0.8";
src = fetchFromGitHub {
owner = "acmesh-official";
repo = "acme.sh";
rev = "refs/tags/${version}";
hash = "sha256-RFybUjBRrpnNCEVKmix2EPiIXrq8p+v4zJaI14NFQQ0=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = let
binPath = lib.makeBinPath [
coreutils
curl
dnsutils
gnugrep
gnused
openssl
socat
(if stdenv.hostPlatform.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/";
changelog = "https://github.com/acmesh-official/acme.sh/releases/tag/${version}";
description = "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 = with lib.maintainers; [ mkaito ] ++ teams.serokell.members;
inherit (coreutils.meta) platforms;
mainProgram = "acme.sh";
};
}
|