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