Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, jinja2 6, napalm 7, poetry-core 8, pytestCheckHook 9, pythonOlder 10, pyyaml 11, toml 12}: 13 14buildPythonPackage rec { 15 pname = "netutils"; 16 version = "1.6.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "networktocode"; 23 repo = pname; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-ocajE7E4xIatEmv58/9gEpWF2plJdiZXjk6ajD2vTzw="; 26 }; 27 28 nativeBuildInputs = [ 29 poetry-core 30 ]; 31 32 propagatedBuildInputs = [ 33 napalm 34 ]; 35 36 nativeCheckInputs = [ 37 jinja2 38 pytestCheckHook 39 pyyaml 40 toml 41 ]; 42 43 pythonImportsCheck = [ 44 "netutils" 45 ]; 46 47 disabledTests = [ 48 # Tests require network access 49 "test_is_fqdn_resolvable" 50 "test_fqdn_to_ip" 51 "test_tcp_ping" 52 # Skip Sphinx test 53 "test_sphinx_build" 54 # OSError: [Errno 22] Invalid argument 55 "test_compare_type5" 56 "test_encrypt_type5" 57 "test_compare_cisco_type5" 58 "test_get_napalm_getters_napalm_installed_default" 59 "test_encrypt_cisco_type5" 60 ]; 61 62 meta = with lib; { 63 description = "Library that is a collection of objects for common network automation tasks"; 64 homepage = "https://github.com/networktocode/netutils"; 65 changelog = "https://github.com/networktocode/netutils/releases/tag/v${version}"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ fab ]; 68 broken = stdenv.isDarwin; 69 }; 70}