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 ]) ```
This commit is contained in:
parent
8ad62167e8
commit
718a4496df
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user