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