1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools-scm 5, requests 6, six 7, pytestCheckHook 8, pyyaml 9}: 10 11buildPythonPackage rec { 12 pname = "pynetbox"; 13 version = "7.2.0"; 14 format = "setuptools"; 15 16 src = fetchFromGitHub { 17 owner = "netbox-community"; 18 repo = pname; 19 rev = "refs/tags/v${version}"; 20 hash = "sha256-rYqwZIqcNeSpXsICL8WGLJ3Tcnwnnm6gvRBEJ/5iE/Q="; 21 }; 22 23 SETUPTOOLS_SCM_PRETEND_VERSION = version; 24 25 nativeBuildInputs = [ 26 setuptools-scm 27 ]; 28 29 propagatedBuildInputs = [ 30 requests 31 six 32 ]; 33 34 nativeCheckInputs = [ 35 pytestCheckHook 36 pyyaml 37 ]; 38 39 disabledTestPaths = [ 40 # requires docker for integration test 41 "tests/integration" 42 ]; 43 44 meta = with lib; { 45 changelog = "https://github.com/netbox-community/pynetbox/releases/tag/v${version}"; 46 description = "API client library for Netbox"; 47 homepage = "https://github.com/netbox-community/pynetbox"; 48 license = licenses.asl20; 49 maintainers = with maintainers; [ hexa ]; 50 }; 51}