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

53 lines
1.4 KiB
Nix
Raw Normal View History

2016-11-08 15:16:06 +01:00
{ stdenv, python2Packages, fetchFromGitHub, dialog }:
2015-10-31 22:01:20 +01:00
2016-11-08 15:16:06 +01:00
# Latest version of certbot supports python3 and python3 version of pythondialog
python2Packages.buildPythonApplication rec {
name = "certbot-${version}";
2016-12-13 12:00:27 +01:00
version = "0.9.3";
src = fetchFromGitHub {
owner = "certbot";
repo = "certbot";
rev = "v${version}";
2016-12-13 12:00:27 +01:00
sha256 = "03yfr8vlq62l0h14qk03flrkbvbv9mc5cf6rmh37naj8jwpl8cic";
2015-10-31 22:01:20 +01:00
};
2016-11-08 15:16:06 +01:00
propagatedBuildInputs = with python2Packages; [
ConfigArgParse
acme
configobj
cryptography
parsedatetime
psutil
pyRFC3339
pyopenssl
python2-pythondialog
pytz
six
zope_component
zope_interface
2015-10-31 22:01:20 +01:00
];
2016-11-08 15:16:06 +01:00
buildInputs = [ dialog ] ++ (with python2Packages; [ nose mock gnureadline ]);
2015-10-31 22:01:20 +01:00
patchPhase = ''
2017-01-29 05:48:03 +01:00
substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/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
'';
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
};
}