pulumi: passthru.{pkgs,withPackages}

This commit is contained in:
Vincent Haupert 2022-10-18 21:17:01 +02:00
parent b725a0b647
commit ce1faf92f2

View File

@ -5,6 +5,11 @@
, fetchFromGitHub
, installShellFiles
, git
# passthru
, runCommand
, makeWrapper
, pulumi
, pulumiPackages
}:
buildGoModule rec {
@ -76,6 +81,19 @@ buildGoModule rec {
--zsh <($out/bin/pulumi gen-completion zsh)
'';
passthru = {
pkgs = pulumiPackages;
withPackages = f: runCommand "${pulumi.name}-with-packages"
{
nativeBuildInputs = [ makeWrapper ];
}
''
mkdir -p $out/bin
makeWrapper ${pulumi}/bin/pulumi $out/bin/pulumi \
--suffix PATH : ${lib.makeSearchPath "bin" (f pulumiPackages)}
'';
};
meta = with lib; {
homepage = "https://pulumi.io/";
description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive";