2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2022-01-19 23:45:15 +00:00
|
|
|
, pytest
|
2021-03-20 04:20:00 +00:00
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, matplotlib
|
|
|
|
, docutils
|
|
|
|
, pyopencl
|
|
|
|
, opencl-headers
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sasmodels";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.0.6";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SasView";
|
|
|
|
repo = "sasmodels";
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
hash = "sha256-RVEPu07gp1ScciJQmjizyELcOD2WSjIlxunj5LnmXdw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
opencl-headers
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2022-03-30 09:31:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) py.test -c ./pytest.ini
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sasmodels"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|