Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
jinja2,
|
|
jsonschema,
|
|
napalm,
|
|
poetry-core,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pyyaml,
|
|
toml,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "netutils";
|
|
version = "1.15.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "networktocode";
|
|
repo = "netutils";
|
|
tag = "v${version}";
|
|
hash = "sha256-BdxmzxnuccAb8BiE48KSYLXJzAaz7eSYMJA2bgSbWj4=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [ jsonschema ];
|
|
|
|
optional-dependencies.optionals = [
|
|
jsonschema
|
|
napalm
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
jinja2
|
|
pytestCheckHook
|
|
pyyaml
|
|
toml
|
|
];
|
|
|
|
pythonImportsCheck = [ "netutils" ];
|
|
|
|
disabledTests = [
|
|
# Tests require network access
|
|
"test_is_fqdn_resolvable"
|
|
"test_fqdn_to_ip"
|
|
"test_tcp_ping"
|
|
# Skip Sphinx test
|
|
"test_sphinx_build"
|
|
# OSError: [Errno 22] Invalid argument
|
|
"test_compare_type5"
|
|
"test_encrypt_type5"
|
|
"test_compare_cisco_type5"
|
|
"test_get_napalm_getters_napalm_installed_default"
|
|
"test_encrypt_cisco_type5"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library that is a collection of objects for common network automation tasks";
|
|
homepage = "https://github.com/networktocode/netutils";
|
|
changelog = "https://github.com/networktocode/netutils/releases/tag/${src.tag}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|