nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6
7 # build-system
8 setuptools,
9 cffi,
10
11 # dependencies
12 jinja2,
13 junos-eznc,
14 lxml,
15 ncclient,
16 netaddr,
17 netmiko,
18 netutils,
19 paramiko,
20 pyeapi,
21 pyyaml,
22 requests,
23 scp,
24 textfsm,
25 ttp,
26 ttp-templates,
27 typing-extensions,
28
29 # tests
30 pytestCheckHook,
31 ddt,
32 mock,
33}:
34
35buildPythonPackage (finalAttrs: {
36 pname = "napalm";
37 version = "5.1.0";
38 pyproject = true;
39
40 src = fetchFromGitHub {
41 owner = "napalm-automation";
42 repo = "napalm";
43 tag = finalAttrs.version;
44 hash = "sha256-kIQgr5W9xkdcQkscJkOiABJ5HBxZOT9D7jSKWGNoBGA=";
45 };
46
47 build-system = [ setuptools ];
48
49 dependencies = [
50 cffi
51 jinja2
52 junos-eznc
53 lxml
54 ncclient
55 netaddr
56 netmiko
57 # breaks infinite recursion
58 (netutils.override { napalm = null; })
59 paramiko
60 pyeapi
61 pyyaml
62 requests
63 scp
64 setuptools
65 textfsm
66 ttp
67 ttp-templates
68 typing-extensions
69 ];
70
71 nativeCheckInputs = [
72 pytestCheckHook
73 mock
74 ddt
75 ];
76
77 meta = {
78 description = "Network Automation and Programmability Abstraction Layer with Multivendor support";
79 homepage = "https://github.com/napalm-automation/napalm";
80 license = lib.licenses.asl20;
81 };
82})