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 = "6.2.0";
14
15 src = fetchFromGitHub {
16 owner = "netbox-community";
17 repo = pname;
18 rev = "v${version}";
19 sha256 = "1j91m5g4qxkf59m506aw6vfhv1db1z393924qq3zbyg3wqwq1rxx";
20 };
21
22 SETUPTOOLS_SCM_PRETEND_VERSION = version;
23
24 nativeBuildInputs = [
25 setuptools-scm
26 ];
27
28 propagatedBuildInputs = [
29 requests
30 six
31 ];
32
33 checkInputs = [
34 pytestCheckHook
35 pyyaml
36 ];
37
38 disabledTestPaths = [
39 # requires docker for integration test
40 "tests/integration"
41 ];
42
43 meta = with lib; {
44 description = "API client library for Netbox";
45 homepage = "https://github.com/netbox-community/pynetbox";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ hexa ];
48 };
49}