mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-18 06:31:15 +00:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
napalm,
|
|
netmiko,
|
|
pip,
|
|
pytest-cov-stub,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
standard-telnetlib,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "napalm-hp-procurve";
|
|
version = "0.7.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "napalm-automation-community";
|
|
repo = "napalm-hp-procurve";
|
|
tag = version;
|
|
hash = "sha256-cO4kxI90krj1knzixRKWxa77OAaxjO8dLTy02VpkV9M=";
|
|
};
|
|
|
|
patchPhase = ''
|
|
# Dependency installation in setup.py doesn't work
|
|
echo -n > requirements.txt
|
|
substituteInPlace setup.cfg \
|
|
--replace " --pylama" ""
|
|
'';
|
|
|
|
build-system = [
|
|
setuptools
|
|
pip
|
|
];
|
|
|
|
buildInputs = [ napalm ];
|
|
|
|
dependencies = [
|
|
netmiko
|
|
standard-telnetlib
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-cov-stub
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# AssertionError: Some methods vary.
|
|
"test_method_signatures"
|
|
# AttributeError: 'PatchedProcurveDriver' object has no attribute 'platform'
|
|
"test_get_config_filtered"
|
|
# AssertionError
|
|
"test_get_interfaces"
|
|
"test_get_facts"
|
|
];
|
|
|
|
pythonImportsCheck = [ "napalm_procurve" ];
|
|
|
|
meta = {
|
|
description = "HP ProCurve Driver for NAPALM automation frontend";
|
|
homepage = "https://github.com/napalm-automation-community/napalm-hp-procurve";
|
|
changelog = "https://github.com/napalm-automation-community/napalm-hp-procurve/releases/tag/${src.tag}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|