depot/third_party/nixpkgs/pkgs/development/python-modules/junos-eznc/default.nix
Default email 5e2a688410 Project import generated by Copybara.
GitOrigin-RevId: 5e2018f7b383aeca6824a30c0cd1978c9532a46a
2021-10-06 10:57:05 -03:00

51 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, six
, scp
, pyserial
, paramiko
, netaddr
, ncclient
, ntc-templates
, lxml
, jinja2
, pyyaml
, transitions
, yamlordereddictloader
, nose
}:
buildPythonPackage rec {
pname = "junos-eznc";
version = "2.6.3";
src = fetchPypi {
inherit pname version;
sha256 = "4eee93d0af203af7cee54a8f0c7bd28af683e829edf1fd68feba85d0ad737395";
};
postPatch = ''
substituteInPlace requirements.txt \
--replace "ncclient==0.6.9" "ncclient"
'';
checkInputs = [ nose ];
propagatedBuildInputs = [
scp six pyserial paramiko netaddr ncclient ntc-templates lxml jinja2 pyyaml transitions yamlordereddictloader
];
checkPhase = ''
nosetests -v --with-coverage --cover-package=jnpr.junos --cover-inclusive -a unit
'';
pythonImportsCheck = [ "jnpr.junos" ];
meta = with lib; {
homepage = "http://www.github.com/Juniper/py-junos-eznc";
description = "Junos 'EZ' automation for non-programmers";
license = licenses.asl20;
maintainers = with maintainers; [ xnaveira ];
};
}