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

51 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, pythonPackages, fetchFromGitHub, dialog }:
2015-10-31 21:01:20 +00:00
pythonPackages.buildPythonApplication rec {
name = "certbot-${version}";
version = "0.6.0";
src = fetchFromGitHub {
owner = "certbot";
repo = "certbot";
rev = "v${version}";
sha256 = "1x0prlldkgg0hxmya4m5h3k3c872wr0jylmzpr3m04mk339yiw0c";
2015-10-31 21:01:20 +00:00
};
propagatedBuildInputs = with pythonPackages; [
ConfigArgParse
acme
configobj
cryptography
parsedatetime
psutil
pyRFC3339
pyopenssl
python2-pythondialog
pytz
six
zope_component
zope_interface
2015-10-31 21:01:20 +00:00
];
buildInputs = [ dialog ] ++ (with pythonPackages; [ nose mock gnureadline ]);
2015-10-31 21:01:20 +00:00
patchPhase = ''
substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/var/setuid-wrappers/sendmail"
substituteInPlace certbot/le_util.py --replace "sw_vers" "/usr/bin/sw_vers"
2015-10-31 21:01:20 +00:00
'';
postInstall = ''
for i in $out/bin/*; do
wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PATH : "${dialog}/bin:$PATH"
done
'';
meta = with stdenv.lib; {
homepage = src.meta.homepage;
2015-10-31 21:01:20 +00:00
description = "ACME client that can obtain certs and extensibly update server configurations";
platforms = platforms.unix;
maintainers = [ maintainers.domenkozar ];
2015-10-31 21:05:12 +00:00
license = licenses.asl20;
2015-10-31 21:01:20 +00:00
};
}