1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 setuptools-scm,
7 fusepy,
8 fuse,
9 openssl,
10}:
11
12buildPythonPackage rec {
13 pname = "acme-tiny";
14 version = "5.0.2";
15 pyproject = true;
16
17 src = fetchPypi {
18 pname = "acme_tiny";
19 inherit version;
20 hash = "sha256-s84ZVYPcLxOnxvqQBS+Ks0myMtvCZ62cv0co6u2E3dg=";
21 };
22
23 patchPhase = ''
24 substituteInPlace acme_tiny.py --replace-fail '"openssl"' '"${openssl.bin}/bin/openssl"'
25 substituteInPlace tests/test_module.py --replace-fail '"openssl"' '"${openssl.bin}/bin/openssl"'
26 substituteInPlace tests/utils.py --replace-fail /etc/ssl/openssl.cnf ${openssl.out}/etc/ssl/openssl.cnf
27 '';
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 nativeCheckInputs = [
35 fusepy
36 fuse
37 ];
38
39 pythonImportsCheck = [ "acme_tiny" ];
40
41 meta = {
42 description = "Tiny script to issue and renew TLS certs from Let's Encrypt";
43 mainProgram = "acme-tiny";
44 homepage = "https://github.com/diafygi/acme-tiny";
45 license = lib.licenses.mit;
46 };
47}