nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 85 lines 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchFromGitHub 5 6# propagates 7, jinja2 8, lxml 9, ncclient 10, netaddr 11, ntc-templates 12, paramiko 13, pyparsing 14, pyserial 15, pyyaml 16, scp 17, six 18, transitions 19, yamlordereddictloader 20 21# tests 22, mock 23, nose 24, pytestCheckHook 25}: 26 27buildPythonPackage rec { 28 pname = "junos-eznc"; 29 version = "2.6.3"; 30 format = "setuptools"; 31 32 src = fetchFromGitHub { 33 owner = "Juniper"; 34 repo = "py-junos-eznc"; 35 rev = version; 36 hash = "sha256-XhQJwtS518AzSwyaWE392nfNdYe9+iYHvXxQsjJfzI8="; 37 }; 38 39 patches = [ 40 (fetchpatch { 41 # Fixes tests with lxml>=4.8.0; remove > 2.6.3 42 url = "https://github.com/Juniper/py-junos-eznc/commit/048f750bb7357b6f6b9db8ad64bea479298c74fb.patch"; 43 hash = "sha256-DYVj0BNPwDSbxDrzHhaq4F4kz1bliXB6Au3I63mRauc="; 44 }) 45 ]; 46 47 postPatch = '' 48 substituteInPlace requirements.txt \ 49 --replace "ncclient==0.6.9" "ncclient" 50 ''; 51 52 propagatedBuildInputs = [ 53 jinja2 54 lxml 55 ncclient 56 netaddr 57 ntc-templates 58 paramiko 59 pyparsing 60 pyserial 61 pyyaml 62 scp 63 six 64 transitions 65 yamlordereddictloader 66 ]; 67 68 checkInputs = [ 69 mock 70 nose 71 ]; 72 73 checkPhase = '' 74 nosetests -v -a unit --exclude=test_sw_put_ftp 75 ''; 76 77 pythonImportsCheck = [ "jnpr.junos" ]; 78 79 meta = with lib; { 80 homepage = "http://www.github.com/Juniper/py-junos-eznc"; 81 description = "Junos 'EZ' automation for non-programmers"; 82 license = licenses.asl20; 83 maintainers = with maintainers; [ xnaveira ]; 84 }; 85}