summary refs log tree commit diff
path: root/pkgs/development/python-modules/acme-tiny
diff options
context:
space:
mode:
authorwisut hantanong <wizzup@gmail.com>2017-07-19 15:50:21 +0700
committerwisut hantanong <wizzup@gmail.com>2017-07-19 15:50:21 +0700
commitfd174245806f77dd15a8617a14a3af864703d19f (patch)
tree7c9f3d5dcf5fcadfc961bc33b6aa03f80558e1d9 /pkgs/development/python-modules/acme-tiny
parent1fef42dde9281810b2627158f18289f2ce528087 (diff)
downloadnixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar.gz
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar.bz2
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar.lz
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar.xz
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.tar.zst
nixpkgs-fd174245806f77dd15a8617a14a3af864703d19f.zip
python.pkgs.acme-tiny : move to separate expression
Diffstat (limited to 'pkgs/development/python-modules/acme-tiny')
-rw-r--r--pkgs/development/python-modules/acme-tiny/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/acme-tiny/default.nix b/pkgs/development/python-modules/acme-tiny/default.nix
new file mode 100644
index 00000000000..9558febec73
--- /dev/null
+++ b/pkgs/development/python-modules/acme-tiny/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub
+, python, openssl }:
+
+buildPythonPackage rec {
+  pname = "acme-tiny";
+  version = "2016-03-26";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g";
+    rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971";
+    repo = "acme-tiny";
+    owner = "diafygi";
+  };
+
+  # source doesn't have any python "packaging" as such
+  configurePhase = " ";
+  buildPhase = " ";
+  # the tests are... complex
+  doCheck = false;
+
+  patchPhase = ''
+    substituteInPlace acme_tiny.py --replace "openssl" "${openssl.bin}/bin/openssl"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/${python.sitePackages}/
+    cp acme_tiny.py $out/${python.sitePackages}/
+    mkdir -p $out/bin
+    ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny
+    chmod +x $out/bin/acme_tiny
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tiny script to issue and renew TLS certs from Let's Encrypt";
+    homepage = https://github.com/diafygi/acme-tiny;
+    license = licenses.mit;
+  };
+}