2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, pulumi
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
2022-12-28 21:21:41 +00:00
|
|
|
inherit (pulumi) version src sdkVendorHash;
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
pname = "pulumi-language-python";
|
|
|
|
|
|
|
|
sourceRoot = "${src.name}/sdk";
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
vendorHash = sdkVendorHash;
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Requires network
|
|
|
|
substituteInPlace python/python_test.go \
|
|
|
|
--replace "TestRunningPipInVirtualEnvironment" \
|
|
|
|
"SkipTestRunningPipInVirtualEnvironment"
|
|
|
|
|
|
|
|
substituteInPlace python/cmd/pulumi-language-python/main_test.go \
|
|
|
|
--replace "TestDeterminePulumiPackages" \
|
|
|
|
"SkipTestDeterminePulumiPackages"
|
|
|
|
'';
|
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"python/cmd/pulumi-language-python"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp python/cmd/pulumi-language-python-exec $out/bin
|
|
|
|
cp python/dist/pulumi-resource-pulumi-python $out/bin
|
|
|
|
cp python/dist/pulumi-analyzer-policy-python $out/bin
|
|
|
|
'';
|
|
|
|
}
|