2021-03-23 15:36:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, pytest_5
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, matplotlib
|
|
|
|
, docutils
|
|
|
|
, pyopencl
|
|
|
|
, opencl-headers
|
2018-05-12 22:17:03 +01:00
|
|
|
}:
|
2018-03-09 12:00:24 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-10-17 14:36:04 +01:00
|
|
|
pname = "sasmodels";
|
2021-03-23 15:36:01 +00:00
|
|
|
version = "1.0.4";
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2018-05-12 22:17:03 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SasView";
|
|
|
|
repo = "sasmodels";
|
2018-10-17 14:36:04 +01:00
|
|
|
rev = "v${version}";
|
2021-03-23 15:36:01 +00:00
|
|
|
sha256 = "0h2k81dm92sm0z086qy3ipw6y6cfgpb7ppl7lhjmx6816s3k50sa";
|
2018-05-12 22:17:03 +01:00
|
|
|
};
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2018-05-12 22:17:03 +01:00
|
|
|
buildInputs = [ opencl-headers ];
|
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
|
|
|
|
checkInputs = [ pytest_5 ];
|
2018-05-12 22:17:03 +01:00
|
|
|
propagatedBuildInputs = [ docutils matplotlib numpy scipy pyopencl ];
|
2018-03-09 12:00:24 +00:00
|
|
|
|
2018-05-12 22:17:03 +01:00
|
|
|
checkPhase = ''
|
|
|
|
HOME=$(mktemp -d) py.test -c ./pytest.ini
|
|
|
|
'';
|
2018-03-09 12:00:24 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Library of small angle scattering models";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://sasview.org";
|
2018-03-21 13:32:30 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2018-03-09 12:00:24 +00:00
|
|
|
maintainers = with lib.maintainers; [ rprospero ];
|
|
|
|
};
|
|
|
|
}
|