2019-10-18 19:11:49 +02:00
|
|
|
{ stdenv, python37Packages, fetchFromGitHub, fetchurl, dialog, autoPatchelfHook, nginx, pebble }:
|
2015-10-31 22:01:20 +01:00
|
|
|
|
2019-10-18 19:11:49 +02:00
|
|
|
|
|
|
|
python37Packages.buildPythonApplication rec {
|
2019-02-04 04:11:03 +01:00
|
|
|
pname = "certbot";
|
2019-10-18 19:11:49 +02:00
|
|
|
version = "0.39.0";
|
2015-12-05 08:34:50 +01:00
|
|
|
|
2016-01-04 01:54:22 +01:00
|
|
|
src = fetchFromGitHub {
|
2019-02-04 04:11:03 +01:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2016-01-04 01:54:22 +01:00
|
|
|
rev = "v${version}";
|
2019-10-18 19:11:49 +02:00
|
|
|
sha256 = "1s32xg2ljz7ci78wc8rqkjvgrz7vprb7fkznrlf9a4blm55pp54c";
|
2015-10-31 22:01:20 +01:00
|
|
|
};
|
|
|
|
|
2019-10-18 19:11:49 +02:00
|
|
|
patches = [
|
|
|
|
./0001-pebble_artifacts-hardcode-pebble-location.patch
|
2019-10-29 14:10:31 +01:00
|
|
|
./0001-Don-t-use-distutils.StrictVersion-that-cannot-handle.patch
|
2019-10-18 19:11:49 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python37Packages; [
|
2016-01-04 01:54:22 +01:00
|
|
|
ConfigArgParse
|
|
|
|
acme
|
|
|
|
configobj
|
|
|
|
cryptography
|
2019-10-18 19:11:49 +02:00
|
|
|
distro
|
2019-02-04 04:11:03 +01:00
|
|
|
josepy
|
2016-01-04 01:54:22 +01:00
|
|
|
parsedatetime
|
|
|
|
psutil
|
|
|
|
pyRFC3339
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
six
|
|
|
|
zope_component
|
|
|
|
zope_interface
|
2015-10-31 22:01:20 +01:00
|
|
|
];
|
|
|
|
|
2019-10-18 19:11:49 +02:00
|
|
|
buildInputs = [ dialog ] ++ (with python37Packages; [ mock gnureadline ]);
|
|
|
|
|
|
|
|
checkInputs = with python37Packages; [
|
|
|
|
pytest_xdist
|
|
|
|
pytest
|
|
|
|
dateutil
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2017-01-29 11:11:01 +01:00
|
|
|
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"
|
2019-10-18 19:11:49 +02:00
|
|
|
substituteInPlace certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py --replace "@pebble@" "${pebble}/bin/pebble"
|
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-10-18 19:11:49 +02:00
|
|
|
# tests currently time out, because they're trying to do network access
|
|
|
|
# Upstream issue: https://github.com/certbot/certbot/issues/7450
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
PATH="$out/bin:${nginx}/bin:$PATH" pytest certbot-ci/certbot_integration_tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontUseSetuptoolsCheck = true;
|
2018-06-03 22:41:36 +02:00
|
|
|
|
2015-10-31 22:01:20 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-05-09 17:28:52 +02:00
|
|
|
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;
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = [ maintainers.domenkozar ];
|
2015-10-31 22:05:12 +01:00
|
|
|
license = licenses.asl20;
|
2015-10-31 22:01:20 +01:00
|
|
|
};
|
|
|
|
}
|