Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, protobuf 5, dill 6, grpcio 7, pulumi 8, isPy27 9, semver 10, pytestCheckHook 11, pyyaml 12, six 13}: 14buildPythonPackage rec { 15 inherit (pulumi) version src; 16 17 pname = "pulumi"; 18 19 disabled = isPy27; 20 21 propagatedBuildInputs = [ 22 semver 23 protobuf 24 dill 25 grpcio 26 pyyaml 27 six 28 ]; 29 30 nativeCheckInputs = [ 31 pulumi.pkgs.pulumi-language-python 32 pytestCheckHook 33 ]; 34 35 pytestFlagsArray = [ 36 "test/" 37 ]; 38 39 sourceRoot = "${src.name}/sdk/python/lib"; 40 41 # we apply the modifications done in the pulumi/sdk/python/Makefile 42 # but without the venv code 43 postPatch = '' 44 cp ../../README.md . 45 substituteInPlace setup.py \ 46 --replace "3.0.0" "${version}" \ 47 --replace "grpcio==1.51.3" "grpcio" \ 48 --replace "semver~=2.13" "semver" 49 ''; 50 51 # Allow local networking in tests on Darwin 52 __darwinAllowLocalNetworking = true; 53 54 # Verify that the version substitution works 55 preCheck = '' 56 pip show "${pname}" | grep "Version: ${version}" > /dev/null \ 57 || (echo "ERROR: Version substitution seems to be broken"; exit 1) 58 ''; 59 60 pythonImportsCheck = [ "pulumi" ]; 61 62 meta = with lib; { 63 description = "Modern Infrastructure as Code. Any cloud, any language"; 64 homepage = "https://github.com/pulumi/pulumi"; 65 license = licenses.asl20; 66 maintainers = with maintainers; [ teto ]; 67 }; 68}