nixpkgs/pkgs/tools/admin/certbot/default.nix

66 lines
1.4 KiB
Nix
Raw Normal View History

2019-12-14 19:42:16 +01:00
{ stdenv, python37Packages, fetchFromGitHub, fetchurl, dialog, autoPatchelfHook }:
2015-10-31 22:01:20 +01:00
python37Packages.buildPythonApplication rec {
pname = "certbot";
2019-12-14 19:42:16 +01:00
version = "1.0.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
2019-12-14 19:42:16 +01:00
sha256 = "180x7gcpfbrzw8k654s7b5nxdy2yg61lq513dykyn3wz4gssw465";
2015-10-31 22:01:20 +01:00
};
patches = [
./0001-Don-t-use-distutils.StrictVersion-that-cannot-handle.patch
];
propagatedBuildInputs = with python37Packages; [
ConfigArgParse
acme
configobj
cryptography
distro
josepy
parsedatetime
psutil
pyRFC3339
pyopenssl
pytz
six
zope_component
zope_interface
2015-10-31 22:01:20 +01:00
];
buildInputs = [ dialog ] ++ (with python37Packages; [ mock gnureadline ]);
checkInputs = with python37Packages; [
pytest_xdist
pytest
dateutil
];
postPatch = ''
2019-12-14 19:42:16 +01:00
cd certbot
substituteInPlace certbot/_internal/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail"
2015-10-31 22:01:20 +01:00
'';
postInstall = ''
for i in $out/bin/*; do
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PATH : "${dialog}/bin:$PATH"
done
'';
2019-12-14 19:42:16 +01:00
doCheck = true;
2015-10-31 22:01:20 +01:00
meta = with stdenv.lib; {
homepage = src.meta.homepage;
2015-10-31 22:01:20 +01:00
description = "ACME client that can obtain certs and extensibly update server configurations";
platforms = platforms.unix;
maintainers = [ maintainers.domenkozar ];
2015-10-31 22:05:12 +01:00
license = licenses.asl20;
2015-10-31 22:01:20 +01:00
};
}