nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ pkgs
2, buildPythonPackage
3, fetchPypi
4, python
5, azure-mgmt-common
6}:
7
8buildPythonPackage rec {
9 version = "3.1.1";
10 pname = "azure-mgmt-storage";
11
12 src = fetchPypi {
13 inherit pname version;
14 extension = "zip";
15 sha256 = "22a779cae5e09712b7d62ef9bc3d8907a5666893a8a113b6d9348e933170236f";
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/storage/storagemanagement.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}