Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 pytest, 6 numpy, 7 scipy, 8 matplotlib, 9 docutils, 10 pyopencl, 11 opencl-headers, 12 pythonOlder, 13}: 14 15buildPythonPackage rec { 16 pname = "sasmodels"; 17 version = "1.0.7"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "SasView"; 24 repo = "sasmodels"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-GZQYVvQ4bEBizTmJ+o5fIfGr8gn2/4uD3PxIswEjzSE="; 27 }; 28 29 buildInputs = [ opencl-headers ]; 30 31 propagatedBuildInputs = [ 32 docutils 33 matplotlib 34 numpy 35 scipy 36 pyopencl 37 ]; 38 39 # Note: the 1.0.5 release should be compatible with pytest6, so this can 40 # be set back to 'pytest' at that point 41 nativeCheckInputs = [ pytest ]; 42 43 checkPhase = '' 44 HOME=$(mktemp -d) py.test -c ./pytest.ini 45 ''; 46 47 pythonImportsCheck = [ "sasmodels" ]; 48 49 meta = with lib; { 50 description = "Library of small angle scattering models"; 51 homepage = "https://github.com/SasView/sasmodels"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ rprospero ]; 54 }; 55}