summary refs log tree commit diff
path: root/pkgs/development/python-modules/azure-mgmt-storage
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-10 12:29:12 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-10-13 10:07:50 +0200
commit071053bcb03001597e4b4e926c40c88cac095092 (patch)
treefb0b9917ebd4527a104b1603527841bcc96c3d4c /pkgs/development/python-modules/azure-mgmt-storage
parent1675213fac242b0f2174b170fd04d35d8d271602 (diff)
downloadnixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar.gz
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar.bz2
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar.lz
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar.xz
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.tar.zst
nixpkgs-071053bcb03001597e4b4e926c40c88cac095092.zip
pythonPackages.azure-mgmt-storage: refactor move to python-modules
Diffstat (limited to 'pkgs/development/python-modules/azure-mgmt-storage')
-rw-r--r--pkgs/development/python-modules/azure-mgmt-storage/default.nix37
1 files changed, 37 insertions, 0 deletions
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 00000000000..2e0523bb25c
--- /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 ];
+  };
+}