blob: 73873076bda5d01cb1640d27ebec104979bef1c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, isPy3k
, python
, applicationinsights
, portalocker
}:
buildPythonPackage rec {
pname = "azure-cli-telemetry";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "14wmxdsrrlnixaj52q37rrvp9wg5b54gf5wn2z1vq68kxpg1s560";
};
propagatedBuildInputs = [
applicationinsights
portalocker
];
# tests are not published to pypi
doCheck = false;
# Remove overly restrictive version contraints and obsolete namespace setup
prePatch = ''
substituteInPlace setup.py \
--replace "applicationinsights>=0.11.1,<0.11.8" "applicationinsights" \
--replace "portalocker==1.2.1" "portalocker"
substituteInPlace setup.cfg \
--replace "azure-namespace-package = azure-cli-nspkg" ""
'';
# Prevent these __init__'s from violating PEP420, only needed for python2
postInstall = lib.optionalString isPy3k ''
rm $out/${python.sitePackages}/azure/__init__.py \
$out/${python.sitePackages}/azure/cli/__init__.py
'';
meta = with lib; {
homepage = https://github.com/Azure/azure-cli;
description = "Next generation multi-platform command line experience for Azure";
platforms = platforms.all;
license = licenses.mit;
maintainers = with maintainers; [ jonringer ];
};
}
|