at 23.05-pre 1.3 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 checkInputs = [ 31 pulumi.pkgs.pulumi-language-python 32 pytestCheckHook 33 ]; 34 35 pytestFlagsArray = [ 36 "test/" 37 ]; 38 39 sourceRoot = "source/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.47" "grpcio" 48 ''; 49 50 # Allow local networking in tests on Darwin 51 __darwinAllowLocalNetworking = true; 52 53 # Verify that the version substitution works 54 preCheck = '' 55 pip show "${pname}" | grep "Version: ${version}" > /dev/null \ 56 || (echo "ERROR: Version substitution seems to be broken"; exit 1) 57 ''; 58 59 pythonImportsCheck = [ "pulumi" ]; 60 61 meta = with lib; { 62 description = "Modern Infrastructure as Code. Any cloud, any language"; 63 homepage = "https://github.com/pulumi/pulumi"; 64 license = licenses.asl20; 65 maintainers = with maintainers; [ teto ]; 66 }; 67}