2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, pytest_5
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, matplotlib
|
|
|
|
, docutils
|
|
|
|
, pyopencl
|
|
|
|
, opencl-headers
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sasmodels";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.0.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SasView";
|
|
|
|
repo = "sasmodels";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "19h30kcgpvg1qirzjm0vhgvp1yn60ivlglc8a8n2b4d9fp0acfyd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ opencl-headers ];
|
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
|
|
|
|
checkInputs = [ pytest_5 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ docutils matplotlib numpy scipy pyopencl ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) py.test -c ./pytest.ini
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Library of small angle scattering models";
|
|
|
|
homepage = "http://sasview.org";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ rprospero ];
|
|
|
|
};
|
|
|
|
}
|