about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ifconfig-parser/default.nix
blob: 29241983c4c71a20920870f42fdeccbb78832d50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "ifconfig-parser";
  version = "0.0.5";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "KnightWhoSayNi";
    repo = "ifconfig-parser";
    rev = "4921ac9d6be6244b062d082c164f5a5e69522478";
    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 = "Module for parsing raw output of ifconfig";
    homepage = "https://github.com/KnightWhoSayNi/ifconfig-parser";
    license = licenses.mit;
    maintainers = with maintainers; [ atemu ];
  };
}