about summary refs log tree commit diff
path: root/pkgs/tools/admin/simp_le/default.nix
blob: ca0e16c1185a624ca918bb5c73e113c295c40be7 (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
31
32
33
{ stdenv, pythonPackages, bash }:
 
pythonPackages.buildPythonApplication rec {
  pname = "simp_le-client";
  version = "0.8.0";

  src = pythonPackages.fetchPypi {
    inherit pname version;
    sha256 = "0nv9mm99rm8i9flgfgwvmajbsxb5rm162nfxlq3wk66bbbyr6y1i";
  };

  postPatch = ''
    # drop upper bound of acme requirement
    sed -ri "s/'(acme>=[^,]+),<[^']+'/'\1'/" setup.py
    substituteInPlace simp_le.py \
      --replace "/bin/sh" "${bash}/bin/sh"
  '';

  checkPhase = ''
    $out/bin/simp_le --test
  '';

  propagatedBuildInputs = with pythonPackages; [ acme setuptools_scm josepy ];

  meta = with stdenv.lib; {
    homepage = https://github.com/zenhack/simp_le;
    description = "Simple Let's Encrypt client";
    license = licenses.gpl3;
    maintainers = with maintainers; [ gebner makefu ];
    platforms = platforms.all;
  };
}