about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pystatgrab/default.nix
blob: 9ba3fb7b37851043980946036444a63ae4ef7ebc (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, libstatgrab
, pkg-config
, pythonOlder
, setuptools
, unittestCheckHook
, wheel
}:

buildPythonPackage rec {
  pname = "pystatgrab";
  version = "0.7.2";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "libstatgrab";
    repo = "pystatgrab";
    rev = "PYSTATGRAB_${lib.replaceStrings ["."] ["_"] version}";
    hash = "sha256-0FDhkIK8jy3/SFmCzrl9l4RTeIKDjO0o5UoODx6Wnfs=";
  };

  nativeBuildInputs = [
    cython
    pkg-config
    setuptools
    wheel
  ];

  buildInputs = [
    libstatgrab
  ];

  nativeCheckInputs = [
    unittestCheckHook
  ];

  pythonImportsCheck = [
    "statgrab"
  ];

  meta = with lib; {
    description = "Python bindings for libstatgrab";
    homepage = "https://github.com/libstatgrab/pystatgrab";
    changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${lib.replaceStrings ["."] ["_"] version}/NEWS";
    license = licenses.lgpl21Only;
    maintainers = with maintainers; [ fab ];
  };
}