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