diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-01-15 20:41:19 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-04-25 00:04:41 +0200 |
commit | 0540384561541f94435ad0f6e268e6989fb1d37a (patch) | |
tree | 7e8c8b06f6039073dd2d2e648d11b3dba77e63df /pkgs/certbot/default.nix | |
parent | 13cf2ab3521b5abeea0ee723d4657d667c666f32 (diff) | |
download | NUR-0540384561541f94435ad0f6e268e6989fb1d37a.tar.gz NUR-0540384561541f94435ad0f6e268e6989fb1d37a.tar.zst NUR-0540384561541f94435ad0f6e268e6989fb1d37a.zip |
Upgrade acme bot
Diffstat (limited to 'pkgs/certbot/default.nix')
-rw-r--r-- | pkgs/certbot/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/certbot/default.nix b/pkgs/certbot/default.nix new file mode 100644 index 00000000..8fdbfd12 --- /dev/null +++ b/pkgs/certbot/default.nix | |||
@@ -0,0 +1,65 @@ | |||
1 | { stdenv, python37Packages, fetchFromGitHub, fetchurl, dialog, autoPatchelfHook }: | ||
2 | |||
3 | |||
4 | python37Packages.buildPythonApplication rec { | ||
5 | pname = "certbot"; | ||
6 | version = "1.0.0"; | ||
7 | |||
8 | src = fetchFromGitHub { | ||
9 | owner = pname; | ||
10 | repo = pname; | ||
11 | rev = "v${version}"; | ||
12 | sha256 = "180x7gcpfbrzw8k654s7b5nxdy2yg61lq513dykyn3wz4gssw465"; | ||
13 | }; | ||
14 | |||
15 | patches = [ | ||
16 | ./0001-Don-t-use-distutils.StrictVersion-that-cannot-handle.patch | ||
17 | ]; | ||
18 | |||
19 | propagatedBuildInputs = with python37Packages; [ | ||
20 | ConfigArgParse | ||
21 | acme | ||
22 | configobj | ||
23 | cryptography | ||
24 | distro | ||
25 | josepy | ||
26 | parsedatetime | ||
27 | psutil | ||
28 | pyRFC3339 | ||
29 | pyopenssl | ||
30 | pytz | ||
31 | six | ||
32 | zope_component | ||
33 | zope_interface | ||
34 | ]; | ||
35 | |||
36 | buildInputs = [ dialog ] ++ (with python37Packages; [ mock gnureadline ]); | ||
37 | |||
38 | checkInputs = with python37Packages; [ | ||
39 | pytest_xdist | ||
40 | pytest | ||
41 | dateutil | ||
42 | ]; | ||
43 | |||
44 | postPatch = '' | ||
45 | cd certbot | ||
46 | substituteInPlace certbot/_internal/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail" | ||
47 | ''; | ||
48 | |||
49 | postInstall = '' | ||
50 | for i in $out/bin/*; do | ||
51 | wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \ | ||
52 | --prefix PATH : "${dialog}/bin:$PATH" | ||
53 | done | ||
54 | ''; | ||
55 | |||
56 | doCheck = true; | ||
57 | |||
58 | meta = with stdenv.lib; { | ||
59 | homepage = src.meta.homepage; | ||
60 | description = "ACME client that can obtain certs and extensibly update server configurations"; | ||
61 | platforms = platforms.unix; | ||
62 | maintainers = [ maintainers.domenkozar ]; | ||
63 | license = licenses.asl20; | ||
64 | }; | ||
65 | } | ||