uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
67
pkgs/development/python-modules/napalm/default.nix
Normal file
67
pkgs/development/python-modules/napalm/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, setuptools, cffi
|
||||
, paramiko, requests, future, textfsm, jinja2, netaddr, pyyaml, pyeapi, netmiko
|
||||
, junos-eznc, ciscoconfparse, scp, lxml, ncclient, pytestCheckHook, ddt, mock
|
||||
, pythonOlder }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "napalm";
|
||||
version = "3.4.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "napalm-automation";
|
||||
repo = "napalm";
|
||||
rev = version;
|
||||
sha256 = "sha256-TNWRJtc6+VS6wgJGGvCPDoFQmOKQAyXdjFQo9bPJ2F8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# netmiko 4.0.0 support
|
||||
(fetchpatch{
|
||||
url = "https://github.com/napalm-automation/napalm/commit/4b8cc85db3236099a04f742cf71773e74d9dd70e.patch";
|
||||
excludes = [ "requirements.txt" ];
|
||||
sha256 = "sha256-DBKp+wiKd+/j2xAqaQL3UCcGQd6wnWcNTsNXBBt9c98=";
|
||||
})
|
||||
(fetchpatch{
|
||||
url = "https://github.com/napalm-automation/napalm/commit/4a8b5b1823335dd79aa5269c038a1f08ecd35cdd.patch";
|
||||
sha256 = "sha256-uiou/rzmnFf4wAvXwmUsGJx99GeHWKJB2JrMM1kLakM=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "netmiko>=3.3.0,<4.0.0" "netmiko"
|
||||
'';
|
||||
|
||||
buildInputs = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cffi
|
||||
paramiko
|
||||
requests
|
||||
future
|
||||
textfsm
|
||||
jinja2
|
||||
netaddr
|
||||
pyyaml
|
||||
pyeapi
|
||||
netmiko
|
||||
junos-eznc
|
||||
ciscoconfparse
|
||||
scp
|
||||
lxml
|
||||
ncclient
|
||||
];
|
||||
|
||||
checkInputs = [ pytestCheckHook mock ddt ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Network Automation and Programmability Abstraction Layer with Multivendor support";
|
||||
homepage = "https://github.com/napalm-automation/napalm";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.astro ];
|
||||
};
|
||||
}
|
||||
43
pkgs/development/python-modules/napalm/hp-procurve.nix
Normal file
43
pkgs/development/python-modules/napalm/hp-procurve.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, setuptools, napalm, netmiko
|
||||
, pytestCheckHook }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "napalm-hp-procurve";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "napalm-automation-community";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1lspciddkd1w5lfyz35i0qwgpbn5jq9cbqkwjbsvi4kliz229vkh";
|
||||
};
|
||||
|
||||
# dependency installation in setup.py doesn't work
|
||||
patchPhase = ''
|
||||
echo -n > requirements.txt
|
||||
'';
|
||||
|
||||
buildInputs = [ setuptools napalm ];
|
||||
propagatedBuildInputs = [ netmiko ];
|
||||
|
||||
# setup.cfg seems to contain invalid pytest parameters
|
||||
preCheck = ''
|
||||
rm setup.cfg
|
||||
'';
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
disabledTests = [
|
||||
# AssertionError: Some methods vary.
|
||||
"test_method_signatures"
|
||||
# AttributeError: 'PatchedProcurveDriver' object has no attribute 'platform'
|
||||
"test_get_config_filtered"
|
||||
# AssertionError
|
||||
"test_get_interfaces"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "HP ProCurve Driver for NAPALM automation frontend";
|
||||
homepage = "https://github.com/napalm-automation-community/napalm-hp-procurve";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue