push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
{
lib,
buildGoModule,
callPackage,
pulumi,
bash,
python3,
}:
buildGoModule rec {
pname = "pulumi-python";
inherit (pulumi) version src;
sourceRoot = "${src.name}/sdk/python/cmd/pulumi-language-python";
vendorHash = "sha256-BfkjDesPdPDV2uILYaMJFIvaEBKT15ukwaReAL3yziw=";
ldflags = [
"-s"
"-w"
"-X=github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=${version}"
];
checkFlags = [
"-skip=^${
lib.concatStringsSep "$|^" [
"TestLanguage"
"TestDeterminePulumiPackages"
]
}$"
];
nativeCheckInputs = [
python3
];
# For patchShebangsAuto (see scripts copied in postInstall).
buildInputs = [
bash
python3
];
postInstall = ''
cp -t "$out/bin" \
../pulumi-language-python-exec \
../../dist/pulumi-resource-pulumi-python \
../../dist/pulumi-analyzer-policy-python
'';
passthru.tests.smokeTest = callPackage ./smoke-test/default.nix { };
meta = {
homepage = "https://www.pulumi.com/docs/iac/languages-sdks/python/";
description = "Language host for Pulumi programs written in Python";
license = lib.licenses.asl20;
mainProgram = "pulumi-language-python";
maintainers = with lib.maintainers; [
tie
];
};
}

View File

@@ -0,0 +1,2 @@
name: smoke-test
runtime: python

View File

@@ -0,0 +1,18 @@
from binascii import b2a_hex
from os import urandom
from pulumi import export, ResourceOptions
from pulumi.dynamic import Resource, ResourceProvider, CreateResult
class RandomProvider(ResourceProvider):
def create(self, inputs):
return CreateResult(b2a_hex(urandom(16)), outs={})
class Random(Resource):
def __init__(self, name, opts = None):
super().__init__(RandomProvider(), name, {}, opts)
export("out", Random(name="random_test").id)

View File

@@ -0,0 +1,37 @@
{
lib,
stdenvNoCC,
pulumiTestHook,
pulumi,
pulumi-python,
python3Packages,
}:
stdenvNoCC.mkDerivation {
name = "pulumi-python-smoke-test";
src = builtins.filterSource (name: _: !(lib.hasSuffix ".nix" name)) ./.;
doCheck = true;
nativeCheckInputs = [
pulumiTestHook
pulumi
pulumi-python
python3Packages.pulumi
];
__darwinAllowLocalNetworking = true;
checkPhase = ''
runHook preCheck
pulumi update --skip-preview
stackOutput=$(pulumi stack output out)
[[ $stackOutput =~ ^[0-9a-f]{32}$ ]]
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"
runHook postInstall
'';
}