mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 04:13:12 +00:00
pulumi: init at 3.43.1
As opposed to `pulumi-bin`, `pulumi` is built from source.
This commit is contained in:
parent
f572b05f84
commit
35657c4262
90
pkgs/tools/admin/pulumi/default.nix
Normal file
90
pkgs/tools/admin/pulumi/default.nix
Normal file
@ -0,0 +1,90 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, buildGoModule
|
||||
, coreutils
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, git
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pulumi";
|
||||
version = "3.43.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-LbPXCwU6aJp+z5scfej5Reo2X8QUvZpASWkcDBBF1J0=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-APGiCqHdXDRCFx0W8RDeL89sskYZ2vzdpg4ePE7KixA=";
|
||||
|
||||
sourceRoot = "source/pkg";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# Bundle release metadata
|
||||
ldflags = [
|
||||
# Omit the symbol table and debug information.
|
||||
"-s"
|
||||
# Omit the DWARF symbol table.
|
||||
"-w"
|
||||
] ++ importpathFlags;
|
||||
|
||||
importpathFlags = [
|
||||
"-X github.com/pulumi/pulumi/pkg/v3/version.Version=v${version}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = [
|
||||
git
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# The tests require `version.Version` to be unset
|
||||
ldflags=''${ldflags//"$importpathFlags"/}
|
||||
|
||||
# Create some placeholders for plugins used in tests. Otherwise, Pulumi
|
||||
# tries to donwload them and fails, resulting in really long test runs
|
||||
dummyPluginPath=$(mktemp -d)
|
||||
for name in pulumi-{resource-pkg{A,B},-pkgB}; do
|
||||
ln -s ${coreutils}/bin/true "$dummyPluginPath/$name"
|
||||
done
|
||||
|
||||
export PATH=$dummyPluginPath''${PATH:+:}$PATH
|
||||
|
||||
# Code generation tests also download dependencies from network
|
||||
rm codegen/{docs,dotnet,go,nodejs,python,schema}/*_test.go
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export PULUMI_HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
# Allow tests that bind or connect to localhost on macOS.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
PULUMI_SKIP_UPDATE_CHECK=1 $out/bin/pulumi version | grep v${version} > /dev/null
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd pulumi \
|
||||
--bash <($out/bin/pulumi gen-completion bash) \
|
||||
--fish <($out/bin/pulumi gen-completion fish) \
|
||||
--zsh <($out/bin/pulumi gen-completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pulumi.io/";
|
||||
description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive";
|
||||
sourceProvenance = sourceTypes.fromSource;
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [
|
||||
trundle
|
||||
veehaitch
|
||||
];
|
||||
};
|
||||
}
|
@ -10219,6 +10219,8 @@ with pkgs;
|
||||
|
||||
prism = callPackage ../applications/video/prism { };
|
||||
|
||||
pulumi = callPackage ../tools/admin/pulumi { };
|
||||
|
||||
pulumi-bin = callPackage ../tools/admin/pulumi-bin { };
|
||||
|
||||
p0f = callPackage ../tools/security/p0f { };
|
||||
|
Loading…
Reference in New Issue
Block a user