2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-04-27 09:35:20 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, jinja2
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, toml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "netutils";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.4.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "networktocode";
|
|
|
|
repo = pname;
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-RT6KAliRlH285sEx2fbIXJNwe1gcyH6CrQ8pXKgY/hQ=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library that is a collection of objects for common network automation tasks";
|
|
|
|
homepage = "https://github.com/networktocode/netutils";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/networktocode/netutils/releases/tag/v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2022-08-12 12:06:08 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|