3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/admin/certbot/default.nix
Will Dietz 4be1d9a444 certbot, acme: 0.24.0 -> 0.29.1
(same source)
2019-02-03 20:58:45 -06:00

55 lines
1.5 KiB
Nix

{ stdenv, pythonPackages, fetchFromGitHub, dialog }:
# Latest version of certbot supports python3 and python3 version of pythondialog
pythonPackages.buildPythonApplication rec {
name = "certbot-${version}";
version = "0.29.1";
src = fetchFromGitHub {
owner = "certbot";
repo = "certbot";
rev = "v${version}";
sha256 = "13gnqkvmh6mmlqsf18pw0wv6rp8fy0nbqhpw0sv3shkv7iqsmh2k";
};
propagatedBuildInputs = with pythonPackages; [
ConfigArgParse
acme
configobj
cryptography
parsedatetime
psutil
pyRFC3339
pyopenssl
python2-pythondialog
pytz
six
zope_component
zope_interface
];
buildInputs = [ dialog ] ++ (with pythonPackages; [ nose mock gnureadline ]);
patchPhase = ''
substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail"
substituteInPlace certbot/util.py --replace "sw_vers" "/usr/bin/sw_vers"
'';
postInstall = ''
for i in $out/bin/*; do
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PATH : "${dialog}/bin:$PATH"
done
'';
doCheck = !stdenv.isDarwin; # On Hydra Darwin tests fail with "Too many open files".
meta = with stdenv.lib; {
homepage = src.meta.homepage;
description = "ACME client that can obtain certs and extensibly update server configurations";
platforms = platforms.unix;
maintainers = [ maintainers.domenkozar ];
license = licenses.asl20;
};
}