nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchFromGitHub
5, protobuf
6, dill
7, grpcio
8, pulumi-bin
9, isPy27
10, semver
11, pyyaml
12, six
13
14
15# for tests
16, tox
17, go
18, pulumictl
19, bash
20, pylint
21, pytest
22, pytest-timeout
23, coverage
24, black
25, wheel
26, pytest-asyncio
27
28, mypy
29}:
30let
31 data = import ./data.nix {};
32in
33buildPythonPackage rec {
34 pname = "pulumi";
35 version = pulumi-bin.version;
36 disabled = isPy27;
37
38 src = fetchFromGitHub {
39 owner = "pulumi";
40 repo = "pulumi";
41 rev = "v${pulumi-bin.version}";
42 sha256 = "sha256-vqEZEHTpJV65a3leWwYhyi3dzAsN67BXOvk5hnTPeuI=";
43 };
44
45 propagatedBuildInputs = [
46 semver
47 protobuf
48 dill
49 grpcio
50 pyyaml
51 six
52 ];
53
54 checkInputs = [
55 pulumi-bin
56 pulumictl
57 mypy
58 bash
59 go
60 tox
61 pytest
62 pytest-timeout
63 coverage
64 pytest-asyncio
65 wheel
66 black
67 ];
68
69 pythonImportsCheck = ["pulumi"];
70
71 postPatch = ''
72 cp README.md sdk/python/lib
73 patchShebangs .
74 cd sdk/python/lib
75
76 substituteInPlace setup.py \
77 --replace "{VERSION}" "${version}"
78 '';
79
80 # disabled because tests try to fetch go packages from the net
81 doCheck = false;
82
83 meta = with lib; {
84 description = "Modern Infrastructure as Code. Any cloud, any language";
85 homepage = "https://github.com/pulumi/pulumi";
86 license = licenses.asl20;
87 maintainers = with maintainers; [ teto ];
88 };
89}