nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 parver,
6 pulumi,
7 semver,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "pulumi-aws";
13 # Version is independent of pulumi's.
14 version = "7.23.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "pulumi";
19 repo = "pulumi-aws";
20 tag = "v${version}";
21 hash = "sha256-yD6VJ51AWJk4jlHJUtoHXGPtQvAyS0EuItbS1Obq6lc=";
22 };
23
24 sourceRoot = "${src.name}/sdk/python";
25
26 postPatch = ''
27 # We need the version of pulumi-aws in its package metadata to be accurate
28 # as this seems to be used to determine which version of the
29 # pulumi-resource-aws plugin to be dynamically downloaded by the pulumi CLI
30 substituteInPlace pyproject.toml \
31 --replace-fail "7.0.0a0+dev" "${version}"
32 '';
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 parver
38 pulumi
39 semver
40 ];
41
42 # Checks require cloud resources
43 doCheck = false;
44
45 pythonImportsCheck = [ "pulumi_aws" ];
46
47 meta = {
48 description = "Pulumi python amazon web services provider";
49 homepage = "https://github.com/pulumi/pulumi-aws";
50 changelog = "https://github.com/pulumi/pulumi-aws/releases/tag/${src.tag}";
51 license = lib.licenses.asl20;
52 maintainers = [ ];
53 };
54}