Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
runCommand,
|
|
pulumi,
|
|
pulumiPackages,
|
|
makeBinaryWrapper,
|
|
}:
|
|
f:
|
|
# Note that Pulumi prints a warning for “ambient” plugins (i.e. from PATH). E.g.
|
|
# warning: using pulumi-resource-* from $PATH at /nix/store/*
|
|
# See also https://github.com/pulumi/pulumi/issues/14525
|
|
#
|
|
# We can install packages alongside pulumi executable, but that would only
|
|
# suppress the warning for packages that are bundled with the official
|
|
# distribution. Refer to the implementation of workspace.IsPluginBundled:
|
|
# https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3@v3.150.0/go/common/workspace#IsPluginBundled
|
|
# https://github.com/pulumi/pulumi/blob/v3.150.0/sdk/go/common/workspace/plugins.go#L2202-L2210
|
|
runCommand "pulumi-with-packages"
|
|
{
|
|
inherit pulumi;
|
|
makeWrapperArgs = [
|
|
"--suffix"
|
|
"PATH"
|
|
":"
|
|
(lib.makeBinPath (f pulumiPackages))
|
|
];
|
|
__structuredAttrs = true;
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
meta.mainProgram = "pulumi";
|
|
}
|
|
''
|
|
mkdir -p "$out/bin"
|
|
ln -s -t "$out" "$pulumi/share"
|
|
makeWrapper "$pulumi/bin/pulumi" "$out/bin/pulumi" "''${makeWrapperArgs[@]}"
|
|
''
|