2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
napalm,
|
|
|
|
netmiko,
|
|
|
|
pip,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "napalm-hp-procurve";
|
|
|
|
version = "0.7.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "setuptools";
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "napalm-automation-community";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "napalm-hp-procurve";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M=";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
# Dependency installation in setup.py doesn't work
|
2022-02-21 08:47:16 +00:00
|
|
|
echo -n > requirements.txt
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=napalm_procurve --cov-report term-missing -vs --pylama" ""
|
2022-02-21 08:47:16 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pip ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ napalm ];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ netmiko ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Some methods vary.
|
|
|
|
"test_method_signatures"
|
|
|
|
# AttributeError: 'PatchedProcurveDriver' object has no attribute 'platform'
|
|
|
|
"test_get_config_filtered"
|
2022-06-16 17:23:12 +00:00
|
|
|
# AssertionError
|
|
|
|
"test_get_interfaces"
|
2024-01-02 11:29:13 +00:00
|
|
|
"test_get_facts"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "napalm_procurve" ];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "HP ProCurve Driver for NAPALM automation frontend";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/napalm-automation-community/napalm-hp-procurve";
|
2022-02-21 08:47:16 +00:00
|
|
|
license = licenses.asl20;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
}
|