2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, dnspython
|
2023-02-22 10:55:15 +00:00
|
|
|
, deprecat
|
2022-05-18 14:49:53 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, loguru
|
2022-05-18 14:49:53 +00:00
|
|
|
, passlib
|
|
|
|
, poetry-core
|
2022-03-05 16:20:37 +00:00
|
|
|
, pytestCheckHook
|
2022-05-18 14:49:53 +00:00
|
|
|
, pythonOlder
|
|
|
|
, toml
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ciscoconfparse";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "1.7.18";
|
2022-02-21 08:47:16 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mpenning";
|
|
|
|
repo = pname;
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
hash = "sha256-jWInSqvMuwYJTPqHnrYWhMH/HvaQc2dFRqQu4RGFr28=";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
postPatch = ''
|
2022-02-21 08:47:16 +00:00
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
passlib
|
2023-02-22 10:55:15 +00:00
|
|
|
deprecat
|
2022-03-05 16:20:37 +00:00
|
|
|
dnspython
|
|
|
|
loguru
|
2022-04-15 01:41:22 +00:00
|
|
|
toml
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/parse_test.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-05-18 14:49:53 +00:00
|
|
|
# Tests require network access
|
2022-03-05 16:20:37 +00:00
|
|
|
"test_dns_lookup"
|
|
|
|
"test_reverse_dns_lookup"
|
2023-02-22 10:55:15 +00:00
|
|
|
# Path issues with configuration files
|
|
|
|
"testParse_valid_filepath"
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ciscoconfparse"
|
|
|
|
];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-22 10:55:15 +00:00
|
|
|
description = "Module to parse, audit, query, build, and modify Cisco IOS-style configurations";
|
2022-02-21 08:47:16 +00:00
|
|
|
homepage = "https://github.com/mpenning/ciscoconfparse";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/mpenning/ciscoconfparse/blob/${version}/CHANGES.md";
|
2022-02-21 08:47:16 +00:00
|
|
|
license = licenses.gpl3Only;
|
2022-05-18 14:49:53 +00:00
|
|
|
maintainers = with maintainers; [ astro ];
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
}
|