Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 93 lines 2.0 kB view raw
1{ stdenv 2, lib 3, python 4, buildPythonPackage 5, fetchPypi 6, adal 7, antlr4-python3-runtime 8, argcomplete 9, azure-cli-telemetry 10, colorama 11, jmespath 12, humanfriendly 13, knack 14, msrest 15, msrestazure 16, paramiko 17, pygments 18, pyjwt 19, pyopenssl 20, pyyaml 21, requests 22, six 23, tabulate 24, azure-mgmt-resource 25, pyperclip 26, psutil 27, enum34 28, futures 29, antlr4-python2-runtime 30, ndg-httpsclient 31, isPy3k 32}: 33 34buildPythonPackage rec { 35 pname = "azure-cli-core"; 36 version = "2.0.71"; 37 38 src = fetchPypi { 39 inherit pname version; 40 sha256 = "01pqdh16l2c9a6b1az9galmm1szvhg7fyf9shq872wanw1xx88dj"; 41 }; 42 43 propagatedBuildInputs = [ 44 adal 45 argcomplete 46 azure-cli-telemetry 47 colorama 48 jmespath 49 humanfriendly 50 knack 51 msrest 52 msrestazure 53 paramiko 54 pygments 55 pyjwt 56 pyopenssl 57 pyyaml 58 requests 59 six 60 tabulate 61 azure-mgmt-resource 62 pyperclip 63 psutil 64 ] 65 ++ lib.optionals isPy3k [ antlr4-python3-runtime ] 66 ++ lib.optionals (!isPy3k) [ enum34 futures antlr4-python2-runtime ndg-httpsclient ]; 67 68 # Remove overly restrictive version contraints and obsolete namespace setup 69 prePatch = '' 70 substituteInPlace setup.py \ 71 --replace "wheel==0.30.0" "wheel" \ 72 --replace "azure-mgmt-resource==2.1.0" "azure-mgmt-resource" 73 substituteInPlace setup.cfg \ 74 --replace "azure-namespace-package = azure-cli-nspkg" "" 75 ''; 76 77 # Prevent these __init__'s from violating PEP420, only needed for python2 78 postInstall = lib.optionalString isPy3k '' 79 rm $out/${python.sitePackages}/azure/__init__.py \ 80 $out/${python.sitePackages}/azure/cli/__init__.py 81 ''; 82 83 # Tests are not included in sdist package 84 doCheck = false; 85 86 meta = with lib; { 87 homepage = https://github.com/Azure/azure-cli; 88 description = "Next generation multi-platform command line experience for Azure"; 89 platforms = platforms.all; 90 license = licenses.mit; 91 maintainers = with maintainers; [ jonringer ]; 92 }; 93}