python312Packages.ifconfig-parser: refactor

+21 -5
+21 -5
pkgs/development/python-modules/ifconfig-parser/default.nix
··· 1 - { lib, buildPythonPackage, fetchFromGitHub }: 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , setuptools 5 + , pythonOlder 6 + }: 2 7 3 8 buildPythonPackage rec { 4 9 pname = "ifconfig-parser"; 5 10 version = "0.0.5"; 6 - format = "setuptools"; 11 + pyproject = true; 12 + 13 + disabled = pythonOlder "3.7"; 7 14 8 15 src = fetchFromGitHub { 9 16 owner = "KnightWhoSayNi"; 10 - repo = pname; 17 + repo = "ifconfig-parser"; 11 18 rev = "4921ac9d6be6244b062d082c164f5a5e69522478"; 12 - sha256 = "07hbkbr1qspr7qgzldkaslzc6ripj5zlif12d4fk5j801yhvnxjd"; 19 + hash = "sha256-TXa7oQ8AyTIdaSK4SH+RN2bDPtVqNvofPvlqHPKaCx4="; 13 20 }; 21 + 22 + build-system = [ 23 + setuptools 24 + ]; 25 + 14 26 15 27 checkPhase = '' 16 28 export PYTHONPATH=$PYTHONPATH:$(pwd)/ifconfigparser:$(pwd)/ifconfigparser/tests 17 29 python -m unittest -v test_ifconfig_parser.TestIfconfigParser 18 30 ''; 19 31 32 + pythonImportsCheck = [ 33 + "ifconfigparser" 34 + ]; 35 + 20 36 meta = with lib; { 21 - description = "Unsophisticated python package for parsing raw output of ifconfig."; 37 + description = "Module for parsing raw output of ifconfig"; 22 38 homepage = "https://github.com/KnightWhoSayNi/ifconfig-parser"; 23 39 license = licenses.mit; 24 40 maintainers = with maintainers; [ atemu ];