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

53 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, python3Packages, fetchFromGitHub, dialog }:
2015-10-31 22:01:20 +01:00
python3Packages.buildPythonApplication rec {
pname = "certbot";
2019-02-12 11:38:43 +01:00
version = "0.31.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
2019-02-12 11:38:43 +01:00
sha256 = "0rwjxmkpicyc9a5janvj1lfi430nq6ha94nyfgp11ds9fyydbh1s";
2015-10-31 22:01:20 +01:00
};
propagatedBuildInputs = with python3Packages; [
ConfigArgParse
acme
configobj
cryptography
josepy
parsedatetime
psutil
pyRFC3339
pyopenssl
pytz
six
zope_component
zope_interface
2015-10-31 22:01:20 +01:00
];
buildInputs = [ dialog ] ++ (with python3Packages; [ mock gnureadline ]);
2015-10-31 22:01:20 +01:00
patchPhase = ''
substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail"
2016-12-13 12:00:27 +01:00
substituteInPlace certbot/util.py --replace "sw_vers" "/usr/bin/sw_vers"
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
'';
doCheck = !stdenv.isDarwin; # On Hydra Darwin tests fail with "Too many open files".
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
};
}