1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, pytest
5, numpy
6, scipy
7, matplotlib
8, docutils
9, pyopencl
10, opencl-headers
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "sasmodels";
16 version = "1.0.7";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "SasView";
23 repo = "sasmodels";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-GZQYVvQ4bEBizTmJ+o5fIfGr8gn2/4uD3PxIswEjzSE=";
26 };
27
28 buildInputs = [
29 opencl-headers
30 ];
31
32 propagatedBuildInputs = [
33 docutils
34 matplotlib
35 numpy
36 scipy
37 pyopencl
38 ];
39
40 # Note: the 1.0.5 release should be compatible with pytest6, so this can
41 # be set back to 'pytest' at that point
42 nativeCheckInputs = [
43 pytest
44 ];
45
46 checkPhase = ''
47 HOME=$(mktemp -d) py.test -c ./pytest.ini
48 '';
49
50 pythonImportsCheck = [
51 "sasmodels"
52 ];
53
54 meta = with lib; {
55 description = "Library of small angle scattering models";
56 homepage = "https://github.com/SasView/sasmodels";
57 license = licenses.bsd3;
58 maintainers = with maintainers; [ rprospero ];
59 };
60}