diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/certbot/default.nix | 65 | ||||
-rw-r--r-- | pkgs/default.nix | 3 | ||||
-rw-r--r-- | pkgs/simp_le/default.nix | 32 |
3 files changed, 100 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 | } | ||
diff --git a/pkgs/default.nix b/pkgs/default.nix index 82be20e5..54868ba9 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix | |||
@@ -48,6 +48,9 @@ rec { | |||
48 | naemon = callPackage ./naemon { inherit mylibs monitoring-plugins; }; | 48 | naemon = callPackage ./naemon { inherit mylibs monitoring-plugins; }; |
49 | naemon-livestatus = callPackage ./naemon-livestatus { inherit mylibs naemon; }; | 49 | naemon-livestatus = callPackage ./naemon-livestatus { inherit mylibs naemon; }; |
50 | 50 | ||
51 | simp_le_0_17 = callPackage ./simp_le {}; | ||
52 | certbot = callPackage ./certbot {}; | ||
53 | |||
51 | private = if builtins.pathExists (./. + "/private") | 54 | private = if builtins.pathExists (./. + "/private") |
52 | then import ./private { inherit pkgs; } | 55 | then import ./private { inherit pkgs; } |
53 | else { webapps = {}; }; | 56 | else { webapps = {}; }; |
diff --git a/pkgs/simp_le/default.nix b/pkgs/simp_le/default.nix new file mode 100644 index 00000000..eaefba36 --- /dev/null +++ b/pkgs/simp_le/default.nix | |||
@@ -0,0 +1,32 @@ | |||
1 | { stdenv, python3Packages, bash }: | ||
2 | |||
3 | python3Packages.buildPythonApplication rec { | ||
4 | pname = "simp_le-client"; | ||
5 | version = "0.17.0"; | ||
6 | |||
7 | src = python3Packages.fetchPypi { | ||
8 | inherit pname version; | ||
9 | sha256 = "0m1jynar4calaffp2zdxr5yy9vnhw2qf2hsfxwzfwf8fqb5h7bjb"; | ||
10 | }; | ||
11 | |||
12 | postPatch = '' | ||
13 | # drop upper bound of idna requirement | ||
14 | sed -ri "s/'(idna)<[^']+'/'\1'/" setup.py | ||
15 | substituteInPlace simp_le.py \ | ||
16 | --replace "/bin/sh" "${bash}/bin/sh" | ||
17 | ''; | ||
18 | |||
19 | checkPhase = '' | ||
20 | $out/bin/simp_le --test | ||
21 | ''; | ||
22 | |||
23 | propagatedBuildInputs = with python3Packages; [ acme setuptools_scm josepy idna ]; | ||
24 | |||
25 | meta = with stdenv.lib; { | ||
26 | homepage = https://github.com/zenhack/simp_le; | ||
27 | description = "Simple Let's Encrypt client"; | ||
28 | license = licenses.gpl3; | ||
29 | maintainers = with maintainers; [ gebner makefu ]; | ||
30 | platforms = platforms.linux; | ||
31 | }; | ||
32 | } | ||