From 4e3c870764013e4826fd63de7cff64e660a177ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Apr 2024 11:46:18 +0200 Subject: [PATCH 1/2] python312Packages.ifconfig-parser: refactor --- .../ifconfig-parser/default.nix | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ifconfig-parser/default.nix b/pkgs/development/python-modules/ifconfig-parser/default.nix index 0a7013066b60..cea85adb05e4 100644 --- a/pkgs/development/python-modules/ifconfig-parser/default.nix +++ b/pkgs/development/python-modules/ifconfig-parser/default.nix @@ -1,24 +1,40 @@ -{ lib, buildPythonPackage, fetchFromGitHub }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pythonOlder +}: buildPythonPackage rec { pname = "ifconfig-parser"; version = "0.0.5"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "KnightWhoSayNi"; - repo = pname; + repo = "ifconfig-parser"; rev = "4921ac9d6be6244b062d082c164f5a5e69522478"; - sha256 = "07hbkbr1qspr7qgzldkaslzc6ripj5zlif12d4fk5j801yhvnxjd"; + hash = "sha256-TXa7oQ8AyTIdaSK4SH+RN2bDPtVqNvofPvlqHPKaCx4="; }; + build-system = [ + setuptools + ]; + + checkPhase = '' export PYTHONPATH=$PYTHONPATH:$(pwd)/ifconfigparser:$(pwd)/ifconfigparser/tests python -m unittest -v test_ifconfig_parser.TestIfconfigParser ''; + pythonImportsCheck = [ + "ifconfigparser" + ]; + meta = with lib; { - description = "Unsophisticated python package for parsing raw output of ifconfig."; + description = "Module for parsing raw output of ifconfig"; homepage = "https://github.com/KnightWhoSayNi/ifconfig-parser"; license = licenses.mit; maintainers = with maintainers; [ atemu ]; From 287c7aea9909bf2e01fd9f0e2318b0bfc46339db Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Apr 2024 11:46:42 +0200 Subject: [PATCH 2/2] python312Packages.ifconfig-parser: format with nixfmt --- .../ifconfig-parser/default.nix | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/ifconfig-parser/default.nix b/pkgs/development/python-modules/ifconfig-parser/default.nix index cea85adb05e4..29241983c4c7 100644 --- a/pkgs/development/python-modules/ifconfig-parser/default.nix +++ b/pkgs/development/python-modules/ifconfig-parser/default.nix @@ -1,8 +1,9 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, setuptools -, pythonOlder +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + pythonOlder, }: buildPythonPackage rec { @@ -19,19 +20,14 @@ buildPythonPackage rec { hash = "sha256-TXa7oQ8AyTIdaSK4SH+RN2bDPtVqNvofPvlqHPKaCx4="; }; - build-system = [ - setuptools - ]; - + build-system = [ setuptools ]; checkPhase = '' export PYTHONPATH=$PYTHONPATH:$(pwd)/ifconfigparser:$(pwd)/ifconfigparser/tests python -m unittest -v test_ifconfig_parser.TestIfconfigParser ''; - pythonImportsCheck = [ - "ifconfigparser" - ]; + pythonImportsCheck = [ "ifconfigparser" ]; meta = with lib; { description = "Module for parsing raw output of ifconfig";