diff options
| author | Florian Klink <flokli@flokli.de> | 2020-07-09 14:11:25 +0200 |
|---|---|---|
| committer | Florian Klink <flokli@flokli.de> | 2020-07-22 12:07:15 +0200 |
| commit | 718a4496dfbbb8f6917e9737807e10e4b074dbf4 (patch) | |
| tree | 7a85a9f9f17391621db51fa32980fc21a893bf55 /pkgs/development/python-modules/certbot | |
| parent | certbot: move to python package set, cleanup (diff) | |
| download | nixpkgs-718a4496dfbbb8f6917e9737807e10e4b074dbf4.tar.gz | |
certbot: add certbot.withPlugins
This can be used to wrap certbot to include some plugins.
certbot.withPlugins has a similar calling convention as python*.withPackages:
```
certbot.withPlugins (cp: [ cp.certbot-dns-foo ])
```
Diffstat (limited to 'pkgs/development/python-modules/certbot')
| -rw-r--r-- | pkgs/development/python-modules/certbot/default.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/certbot/default.nix b/pkgs/development/python-modules/certbot/default.nix index 335e62e6a8b8..79e5c3288b7f 100644 --- a/pkgs/development/python-modules/certbot/default.nix +++ b/pkgs/development/python-modules/certbot/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, python, runCommand , fetchFromGitHub , ConfigArgParse, acme, configobj, cryptography, distro, josepy, parsedatetime, pyRFC3339, pyopenssl, pytz, requests, six, zope_component, zope_interface , dialog, mock, gnureadline @@ -51,6 +52,19 @@ buildPythonPackage rec { 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 ]) + passthru.withPlugins = f: let + pythonEnv = python.withPackages f; + + in runCommand "certbot-with-plugins" { + } '' + mkdir -p $out/bin + cd $out/bin + ln -s ${pythonEnv}/bin/certbot + ''; + meta = with lib; { homepage = src.meta.homepage; description = "ACME client that can obtain certs and extensibly update server configurations"; |
