diff --git a/pkgs/development/python-modules/azure-mgmt-storage/default.nix b/pkgs/development/python-modules/azure-mgmt-storage/default.nix new file mode 100644 index 000000000000..2e0523bb25cc --- /dev/null +++ b/pkgs/development/python-modules/azure-mgmt-storage/default.nix @@ -0,0 +1,37 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, azure-mgmt-common +}: + +buildPythonPackage rec { + version = "0.20.0"; + pname = "azure-mgmt-storage"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "16iw7hqhq97vlzfwixarfnirc60l5mz951p57brpcwyylphl3yim"; + }; + + preConfigure = '' + # Patch to make this package work on requests >= 2.11.x + # CAN BE REMOVED ON NEXT PACKAGE UPDATE + sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/storage/storagemanagement.py + ''; + + postInstall = '' + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py + echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py + ''; + + propagatedBuildInputs = [ azure-mgmt-common ]; + + meta = with pkgs.lib; { + description = "Microsoft Azure SDK for Python"; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.asl20; + maintainers = with maintainers; [ olcai ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2e94571c72af..43c4c2e275a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -230,6 +230,8 @@ in { azure-mgmt-nspkg = callPackage ../development/python-modules/azure-mgmt-nspkg { }; + azure-mgmt-storage = callPackage ../development/python-modules/azure-mgmt-storage { }; + backports_csv = callPackage ../development/python-modules/backports_csv {}; backports-shutil-which = callPackage ../development/python-modules/backports-shutil-which {};