1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 napalm,
6 netmiko,
7 pip,
8 pytest-cov-stub,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12 standard-telnetlib,
13}:
14
15buildPythonPackage rec {
16 pname = "napalm-hp-procurve";
17 version = "0.7.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "napalm-automation-community";
24 repo = "napalm-hp-procurve";
25 tag = version;
26 hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M=";
27 };
28
29 patchPhase = ''
30 # Dependency installation in setup.py doesn't work
31 echo -n > requirements.txt
32 substituteInPlace setup.cfg \
33 --replace " --pylama" ""
34 '';
35
36 build-system = [
37 setuptools
38 pip
39 ];
40
41 buildInputs = [ napalm ];
42
43 dependencies = [
44 netmiko
45 standard-telnetlib
46 ];
47
48 nativeCheckInputs = [
49 pytest-cov-stub
50 pytestCheckHook
51 ];
52
53 disabledTests = [
54 # AssertionError: Some methods vary.
55 "test_method_signatures"
56 # AttributeError: 'PatchedProcurveDriver' object has no attribute 'platform'
57 "test_get_config_filtered"
58 # AssertionError
59 "test_get_interfaces"
60 "test_get_facts"
61 ];
62
63 pythonImportsCheck = [ "napalm_procurve" ];
64
65 meta = with lib; {
66 description = "HP ProCurve Driver for NAPALM automation frontend";
67 homepage = "https://github.com/napalm-automation-community/napalm-hp-procurve";
68 changelog = "https://github.com/napalm-automation-community/napalm-hp-procurve/releases/tag/${src.tag}";
69 license = licenses.asl20;
70 maintainers = [ ];
71 };
72}