]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - pkgs/simp_le/default.nix
Upgrade acme bot
[perso/Immae/Config/Nix.git] / pkgs / simp_le / default.nix
diff --git a/pkgs/simp_le/default.nix b/pkgs/simp_le/default.nix
new file mode 100644 (file)
index 0000000..eaefba3
--- /dev/null
@@ -0,0 +1,32 @@
+{ stdenv, python3Packages, bash }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "simp_le-client";
+  version = "0.17.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "0m1jynar4calaffp2zdxr5yy9vnhw2qf2hsfxwzfwf8fqb5h7bjb";
+  };
+
+  postPatch = ''
+    # drop upper bound of idna requirement
+    sed -ri "s/'(idna)<[^']+'/'\1'/" setup.py
+    substituteInPlace simp_le.py \
+      --replace "/bin/sh" "${bash}/bin/sh"
+  '';
+
+  checkPhase = ''
+    $out/bin/simp_le --test
+  '';
+
+  propagatedBuildInputs = with python3Packages; [ acme setuptools_scm josepy idna ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/zenhack/simp_le;
+    description = "Simple Let's Encrypt client";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ gebner makefu ];
+    platforms = platforms.linux;
+  };
+}