diff --git a/pkgs/tools/admin/certbot/default.nix b/pkgs/development/python-modules/certbot/default.nix similarity index 73% rename from pkgs/tools/admin/certbot/default.nix rename to pkgs/development/python-modules/certbot/default.nix index 67d698a64fa..335e62e6a8b 100644 --- a/pkgs/tools/admin/certbot/default.nix +++ b/pkgs/development/python-modules/certbot/default.nix @@ -1,12 +1,12 @@ { lib -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , ConfigArgParse, acme, configobj, cryptography, distro, josepy, parsedatetime, pyRFC3339, pyopenssl, pytz, requests, six, zope_component, zope_interface , dialog, mock, gnureadline -, pytest_xdist, pytest, dateutil +, pytest_xdist, pytest, pytestCheckHook, dateutil }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "certbot"; version = "1.6.0"; @@ -17,6 +17,8 @@ buildPythonApplication rec { sha256 = "1y0m5qm853i6pcpb2mrf8kjkr9wr80mdrx1qmck38ayvr2v2p5lc"; }; + sourceRoot = "source/${pname}"; + propagatedBuildInputs = [ ConfigArgParse acme @@ -36,21 +38,19 @@ buildPythonApplication rec { buildInputs = [ dialog mock gnureadline ]; - checkInputs = [ pytest_xdist pytest dateutil ]; + checkInputs = [ + dateutil + pytest + pytestCheckHook + pytest_xdist + ]; - preBuild = '' - cd certbot - ''; - - postInstall = '' - for i in $out/bin/*; do - wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \ - --prefix PATH : "${dialog}/bin:$PATH" - done - ''; + pytestFlagsArray = [ "-o cache_dir=$(mktemp -d)" ]; doCheck = true; + makeWrapperArgs = [ "--prefix PATH : ${dialog}/bin" ]; + meta = with lib; { homepage = src.meta.homepage; description = "ACME client that can obtain certs and extensibly update server configurations"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a03a861002e..88023394591 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11592,7 +11592,7 @@ in ogre = ogre1_10; }; - certbot = python3Packages.callPackage ../tools/admin/certbot { }; + certbot = python3.pkgs.toPythonApplication python3.pkgs.certbot; caf = callPackage ../development/libraries/caf {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 661966cb768..133cdacd2bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -585,6 +585,8 @@ in { cdecimal = callPackage ../development/python-modules/cdecimal { }; + certbot = callPackage ../development/python-modules/certbot { }; + certbot-dns-cloudflare = callPackage ../development/python-modules/certbot-dns-cloudflare { }; certbot-dns-rfc2136 = callPackage ../development/python-modules/certbot-dns-rfc2136 { };