depot/pkgs/tools/admin/pulumi-bin/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

43 lines
1.4 KiB
Nix

{ lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, installShellFiles }:
let
data = import ./data.nix {};
in stdenv.mkDerivation {
pname = "pulumi";
inherit (data) version;
postUnpack = ''
mv pulumi-* pulumi
'';
srcs = map fetchurl data.pulumiPkgs.${stdenv.hostPlatform.system};
installPhase = ''
install -D -t $out/bin/ *
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/pulumi --set LD_LIBRARY_PATH "${lib.getLib stdenv.cc.cc}/lib"
'' + ''
installShellCompletion --cmd pulumi \
--bash <($out/bin/pulumi completion bash) \
--fish <($out/bin/pulumi completion fish) \
--zsh <($out/bin/pulumi completion zsh)
'';
nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook makeWrapper ];
buildInputs = [ stdenv.cc.cc.libgcc or null ];
meta = with lib; {
homepage = "https://pulumi.io/";
description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = with licenses; [ asl20 ];
platforms = builtins.attrNames data.pulumiPkgs;
maintainers = with maintainers; [
ghuntley
peterromfeldhk
jlesquembre
cpcloud
];
hydraPlatforms = [ ]; # Hydra fails with "Output limit exceeded"
};
}