1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, jinja2 6, poetry-core 7, pytestCheckHook 8, pythonOlder 9, pyyaml 10, toml 11}: 12 13buildPythonPackage rec { 14 pname = "netutils"; 15 version = "1.3.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "networktocode"; 22 repo = pname; 23 rev = "v${version}"; 24 hash = "sha256-3c44ZJIEBhKggtqs77gt2fY3tI00ZGmFGLIGR8LF6aE="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 ]; 30 31 checkInputs = [ 32 jinja2 33 pytestCheckHook 34 pyyaml 35 toml 36 ]; 37 38 pythonImportsCheck = [ 39 "netutils" 40 ]; 41 42 disabledTests = [ 43 # Tests require network access 44 "test_is_fqdn_resolvable" 45 "test_fqdn_to_ip" 46 "test_tcp_ping" 47 # Skip SPhinx test 48 "test_sphinx_build" 49 ]; 50 51 meta = with lib; { 52 description = "Library that is a collection of objects for common network automation tasks"; 53 homepage = "https://github.com/networktocode/netutils"; 54 license = licenses.asl20; 55 maintainers = with maintainers; [ fab ]; 56 broken = stdenv.isDarwin; 57 }; 58}