summary refs log tree commit diff
path: root/pkgs/development/python-modules/acme-tiny/default.nix
blob: c979104914da1c4f8e33639ed85010c1993a626b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, buildPythonPackage, fetchPypi, setuptools_scm, fusepy, fuse
, openssl }:

buildPythonPackage rec {
  pname = "acme-tiny";
  version = "4.1.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0jmg525n4n98hwy3hf303jbnq23z79sqwgliji9j7qcnph47gkgq";
  };

  patchPhase = ''
    substituteInPlace acme_tiny.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
    substituteInPlace tests/monkey.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
    substituteInPlace tests/test_module.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
    substituteInPlace tests/monkey.py --replace /etc/ssl/openssl.cnf ${openssl.out}/etc/ssl/openssl.cnf
  '';

  buildInputs = [ setuptools_scm ];
  checkInputs = [ fusepy fuse ];

  doCheck = false; # seems to hang, not sure

  meta = with 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;
  };
}