From b4c69d74eb4bde1def09f7e4da314b864962ed53 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 6 Mar 2022 22:04:47 +0100 Subject: [PATCH] python3Packages.pulumi: init at 3.25.1 --- .../python-modules/pulumi/default.nix | 102 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 104 insertions(+) create mode 100644 pkgs/development/python-modules/pulumi/default.nix diff --git a/pkgs/development/python-modules/pulumi/default.nix b/pkgs/development/python-modules/pulumi/default.nix new file mode 100644 index 00000000000..3f1d5205f2c --- /dev/null +++ b/pkgs/development/python-modules/pulumi/default.nix @@ -0,0 +1,102 @@ +{ lib +, buildPythonPackage +, fetchpatch +, fetchFromGitHub +, protobuf +, dill +, grpcio +, pulumi-bin +, isPy27 +, semver +, pyyaml +, six + +# for tests +, tox +, go +, pulumictl +, bash +, pylint +, pytest +, pytest-timeout +, coverage +, black +, wheel +, pytest-asyncio + +, mypy +}: + +buildPythonPackage rec { + pname = "pulumi"; + version = pulumi.version; + disabled = isPy27; + + src = pulumi.src; + + patches = [ + # remove in next release + (fetchpatch { + url = "https://github.com/pulumi/pulumi/commit/d4b9d61d70972d22a344419fafc30aace58607f5.patch"; + sha256 = "HEF7VWunFO+NCG18fZA7lbE2l8pc6Z3jcD+rSZ1Jsqg="; + }) ]; + + # src = fetchFromGitHub { + # owner = "pulumi"; + # repo = "pulumi"; + # rev = "073e94a0b8b4ef0b1b856c63670a8dd88f6b6d02"; + # sha256 = "sha256-oyjQW/Z1NvsHpUwikX+bl1npfF4LESOua/o1qjqAgUs="; + # }; + + propagatedBuildInputs = [ + semver + protobuf + dill + grpcio + pyyaml + six + ]; + + checkInputs = [ + pulumi-bin + pulumictl + mypy + bash + go + tox + # pylint + pytest + pytest-timeout + coverage + pytest-asyncio + wheel + black + ]; + + pythonImportsCheck = ["pulumi"]; + + postPatch = '' + cp README.md sdk/python/lib + patchShebangs . + cd sdk/python/lib + substituteInPlace ../Makefile \ + --replace '$(shell cd ../../ && pulumictl get version)' '${pulumi-bin.version}' \ + --replace '$(shell cd ../../ && pulumictl get version --language python)' '${version}' + + substituteInPlace ../requirements.txt \ + --replace 'pylint==2.10.2' 'pylint>=2.10.2' + + substituteInPlace setup.py \ + --replace "{VERSION}" "${version}" + ''; + + # disabled because tests try to fetch go packages from the net + doCheck = false; + + meta = with lib; { + description = "Modern Infrastructure as Code. Any cloud, any language"; + homepage = "https://github.com/pulumi/pulumi"; + license = licenses.asl20; + maintainers = with maintainers; [ teto ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ed03be8d5e..39083d2a46e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1103,6 +1103,8 @@ in { babelgladeextractor = callPackage ../development/python-modules/babelgladeextractor { }; + pulumi = callPackage ../development/python-modules/pulumi { }; + backcall = callPackage ../development/python-modules/backcall { }; backoff = callPackage ../development/python-modules/backoff { };