1{ stdenv, buildPythonPackage, fetchFromGitHub
2, python, openssl }:
3
4buildPythonPackage rec {
5 pname = "acme-tiny";
6 version = "2016-03-26";
7 name = "${pname}-${version}";
8
9 src = fetchFromGitHub {
10 sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g";
11 rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971";
12 repo = "acme-tiny";
13 owner = "diafygi";
14 };
15
16 # source doesn't have any python "packaging" as such
17 configurePhase = " ";
18 buildPhase = " ";
19 # the tests are... complex
20 doCheck = false;
21
22 patchPhase = ''
23 substituteInPlace acme_tiny.py --replace "openssl" "${openssl.bin}/bin/openssl"
24 '';
25
26 installPhase = ''
27 mkdir -p $out/${python.sitePackages}/
28 cp acme_tiny.py $out/${python.sitePackages}/
29 mkdir -p $out/bin
30 ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny
31 chmod +x $out/bin/acme_tiny
32 '';
33
34 meta = with stdenv.lib; {
35 description = "A tiny script to issue and renew TLS certs from Let's Encrypt";
36 homepage = https://github.com/diafygi/acme-tiny;
37 license = licenses.mit;
38 };
39}