2021-03-23 15:36:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2022-01-16 08:25:35 +00:00
|
|
|
, pytest
|
2021-03-23 15:36:01 +00:00
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, matplotlib
|
|
|
|
, docutils
|
|
|
|
, pyopencl
|
|
|
|
, opencl-headers
|
2022-03-19 09:33:35 +00:00
|
|
|
, pythonOlder
|
2018-05-12 21:17:03 +00:00
|
|
|
}:
|
2018-03-09 12:00:24 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-10-17 13:36:04 +00:00
|
|
|
pname = "sasmodels";
|
2023-03-29 23:45:53 +00:00
|
|
|
version = "1.0.7";
|
2022-03-19 09:33:35 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2018-05-12 21:17:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SasView";
|
|
|
|
repo = "sasmodels";
|
2023-03-29 23:45:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-GZQYVvQ4bEBizTmJ+o5fIfGr8gn2/4uD3PxIswEjzSE=";
|
2018-05-12 21:17:03 +00:00
|
|
|
};
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2022-03-19 09:33:35 +00:00
|
|
|
buildInputs = [
|
|
|
|
opencl-headers
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docutils
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
pyopencl
|
|
|
|
];
|
|
|
|
|
2021-03-23 15:36:01 +00:00
|
|
|
# Note: the 1.0.5 release should be compatible with pytest6, so this can
|
|
|
|
# be set back to 'pytest' at that point
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-19 09:33:35 +00:00
|
|
|
pytest
|
|
|
|
];
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2018-05-12 21:17:03 +00:00
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) py.test -c ./pytest.ini
|
|
|
|
'';
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2022-03-19 09:33:35 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sasmodels"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-03-09 12:00:24 +00:00
|
|
|
description = "Library of small angle scattering models";
|
2022-03-19 09:33:35 +00:00
|
|
|
homepage = "https://github.com/SasView/sasmodels";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ rprospero ];
|
2018-03-09 12:00:24 +00:00
|
|
|
};
|
|
|
|
}
|