2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
pythonOlder,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ifconfig-parser";
|
|
|
|
version = "0.0.5";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KnightWhoSayNi";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "ifconfig-parser";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "4921ac9d6be6244b062d082c164f5a5e69522478";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-TXa7oQ8AyTIdaSK4SH+RN2bDPtVqNvofPvlqHPKaCx4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export PYTHONPATH=$PYTHONPATH:$(pwd)/ifconfigparser:$(pwd)/ifconfigparser/tests
|
|
|
|
python -m unittest -v test_ifconfig_parser.TestIfconfigParser
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "ifconfigparser" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Module for parsing raw output of ifconfig";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/KnightWhoSayNi/ifconfig-parser";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ atemu ];
|
|
|
|
};
|
|
|
|
}
|