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