about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-04-16 16:52:30 +0200
committerGitHub <noreply@github.com>2024-04-16 16:52:30 +0200
commit532b6f44d1a86b52a1c944e74108a872c9b09649 (patch)
treeb63ff540ccf3815afaecacb0e6135bc15c37e103 /pkgs
parent8ba35247da0b332a3be3fabfc43de16cb0e4c26c (diff)
parent287c7aea9909bf2e01fd9f0e2318b0bfc46339db (diff)
Merge pull request #304510 from fabaff/ifconfig-parser-refactor
python312Packages.ifconfig-parser: refactor
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/ifconfig-parser/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/ifconfig-parser/default.nix b/pkgs/development/python-modules/ifconfig-parser/default.nix
index 0a7013066b603..29241983c4c71 100644
--- a/pkgs/development/python-modules/ifconfig-parser/default.nix
+++ b/pkgs/development/python-modules/ifconfig-parser/default.nix
@@ -1,24 +1,36 @@
-{ 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 ];