Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ pkgs 2, buildPythonPackage 3, fetchPypi 4, azure-mgmt-common 5, python 6}: 7 8buildPythonPackage rec { 9 version = "2.5.1"; 10 pname = "azure-mgmt-network"; 11 12 src = fetchPypi { 13 inherit pname version; 14 extension = "zip"; 15 sha256 = "cef9bf5d36700966e52f7cea86e29c622bc5bbb92d0ce7a75420e29fb0e75f45"; 16 }; 17 18 preConfigure = '' 19 # Patch to make this package work on requests >= 2.11.x 20 # CAN BE REMOVED ON NEXT PACKAGE UPDATE 21 sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/network/networkresourceprovider.py 22 ''; 23 24 postInstall = '' 25 echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py 26 echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py 27 ''; 28 29 propagatedBuildInputs = [ azure-mgmt-common ]; 30 31 meta = with pkgs.lib; { 32 description = "Microsoft Azure SDK for Python"; 33 homepage = "https://azure.microsoft.com/en-us/develop/python/"; 34 license = licenses.asl20; 35 maintainers = with maintainers; [ olcai ]; 36 }; 37}