1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gsl,
6 swig,
7 numpy,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pygsl";
13 version = "2.3.4";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "pygsl";
18 repo = "pygsl";
19 rev = "refs/tags/v.${version}";
20 hash = "sha256-2TalLKDDoJdKGZHr7eNNvVW8fL7wQJjnZv34LJokfow=";
21 };
22
23 nativeBuildInputs = [
24 gsl.dev
25 swig
26 ];
27 buildInputs = [ gsl ];
28 dependencies = [ numpy ];
29
30 preBuild = ''
31 python setup.py build_ext --inplace
32 '';
33
34 preCheck = ''
35 cd tests
36 '';
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 meta = {
40 description = "Python interface for GNU Scientific Library";
41 homepage = "https://github.com/pygsl/pygsl";
42 changelog = "https://github.com/pygsl/pygsl/blob/v${version}/ChangeLog";
43 license = lib.licenses.gpl2Plus;
44 maintainers = with lib.maintainers; [ amesgen ];
45 };
46}