about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pygsl/default.nix
blob: 0880ff181097559aa2e7569bc6656c567ab3fc55 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, gsl
, swig
, numpy
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pygsl";
  version = "2.3.4";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pygsl";
    repo = "pygsl";
    rev = "refs/tags/v.${version}";
    hash = "sha256-2TalLKDDoJdKGZHr7eNNvVW8fL7wQJjnZv34LJokfow=";
  };

  nativeBuildInputs = [
    gsl.dev
    swig
  ];
  buildInputs = [
    gsl
  ];
  dependencies = [
    numpy
  ];

  preBuild = ''
    python setup.py build_ext --inplace
  '';

  preCheck = ''
    cd tests
  '';
  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "Python interface for GNU Scientific Library";
    homepage = "https://github.com/pygsl/pygsl";
    changelog = "https://github.com/pygsl/pygsl/blob/v${version}/ChangeLog";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ amesgen ];
  };
}