1{ lib
2, buildPythonPackage
3, fetchPypi
4, six
5, scp
6, pyserial
7, paramiko
8, netaddr
9, ncclient
10, ntc-templates
11, lxml
12, jinja2
13, pyyaml
14, transitions
15, yamlordereddictloader
16, nose
17}:
18
19buildPythonPackage rec {
20 pname = "junos-eznc";
21 version = "2.6.3";
22
23 src = fetchPypi {
24 inherit pname version;
25 sha256 = "4eee93d0af203af7cee54a8f0c7bd28af683e829edf1fd68feba85d0ad737395";
26 };
27
28 postPatch = ''
29 substituteInPlace requirements.txt \
30 --replace "ncclient==0.6.9" "ncclient"
31 '';
32
33 checkInputs = [ nose ];
34
35 propagatedBuildInputs = [
36 scp six pyserial paramiko netaddr ncclient ntc-templates lxml jinja2 pyyaml transitions yamlordereddictloader
37 ];
38
39 checkPhase = ''
40 nosetests -v --with-coverage --cover-package=jnpr.junos --cover-inclusive -a unit
41 '';
42
43 pythonImportsCheck = [ "jnpr.junos" ];
44
45 meta = with lib; {
46 homepage = "http://www.github.com/Juniper/py-junos-eznc";
47 description = "Junos 'EZ' automation for non-programmers";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ xnaveira ];
50 };
51}