2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
python,
|
|
|
|
runCommand,
|
|
|
|
fetchFromGitHub,
|
|
|
|
configargparse,
|
|
|
|
acme,
|
|
|
|
configobj,
|
|
|
|
cryptography,
|
|
|
|
distro,
|
|
|
|
josepy,
|
|
|
|
parsedatetime,
|
|
|
|
pyrfc3339,
|
|
|
|
pyopenssl,
|
|
|
|
pytz,
|
|
|
|
requests,
|
|
|
|
six,
|
|
|
|
zope-component,
|
|
|
|
zope-interface,
|
|
|
|
setuptools,
|
|
|
|
dialog,
|
|
|
|
gnureadline,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "certbot";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.9.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "certbot";
|
|
|
|
repo = "certbot";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-yYB9Y0wniRgzNk5XatkjKayIPj7ienXsqOboKPwzIfk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/${pname}";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
configargparse
|
2020-04-24 23:36:52 +00:00
|
|
|
acme
|
|
|
|
configobj
|
|
|
|
cryptography
|
|
|
|
distro
|
|
|
|
josepy
|
|
|
|
parsedatetime
|
2024-01-25 14:12:00 +00:00
|
|
|
pyrfc3339
|
2020-04-24 23:36:52 +00:00
|
|
|
pytz
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools # for pkg_resources
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
dialog
|
|
|
|
gnureadline
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-08-20 17:08:02 +00:00
|
|
|
pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-xdist
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
makeWrapperArgs = [ "--prefix PATH : ${dialog}/bin" ];
|
|
|
|
|
|
|
|
# certbot.withPlugins has a similar calling convention as python*.withPackages
|
|
|
|
# it gets invoked with a lambda, and invokes that lambda with the python package set matching certbot's:
|
|
|
|
# certbot.withPlugins (cp: [ cp.certbot-dns-foo ])
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.withPlugins =
|
|
|
|
f:
|
2022-10-21 18:38:19 +00:00
|
|
|
let
|
|
|
|
pythonEnv = python.withPackages f;
|
|
|
|
in
|
2024-06-05 15:53:02 +00:00
|
|
|
runCommand "certbot-with-plugins" { } ''
|
2022-10-21 18:38:19 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cd $out/bin
|
|
|
|
ln -s ${pythonEnv}/bin/certbot
|
|
|
|
'';
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://github.com/certbot/certbot";
|
|
|
|
changelog = "https://github.com/certbot/certbot/blob/${src.rev}/certbot/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "ACME client that can obtain certs and extensibly update server configurations";
|
|
|
|
platforms = platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "certbot";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
};
|
|
|
|
}
|