1{ stdenv 2, fetchurl 3, buildPythonPackage 4, sphinx 5, pytestcov 6, pytest 7, Mako 8, numpy 9, funcsigs 10, withCuda ? false, pycuda 11, withOpenCL ? true, pyopencl 12}: 13 14buildPythonPackage rec { 15 pname = "reikna"; 16 name = "${pname}-${version}"; 17 version = "0.6.8"; 18 19 src = fetchurl { 20 url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; 21 sha256 = "34d92786237bef9ab5d37d78f01c155d0dcd1fc24df7782af9498a9f1786890c"; 22 }; 23 24 buildInputs = [ sphinx pytestcov pytest ]; 25 26 propagatedBuildInputs = [ Mako numpy funcsigs ] 27 ++ stdenv.lib.optional withCuda pycuda 28 ++ stdenv.lib.optional withOpenCL pyopencl; 29 30 checkPhase = '' 31 py.test 32 ''; 33 34 # Requires device 35 doCheck = false; 36 37 meta = { 38 description = "GPGPU algorithms for PyCUDA and PyOpenCL"; 39 homepage = https://github.com/fjarri/reikna; 40 license = stdenv.lib.licenses.mit; 41 maintainers = [ stdenv.lib.maintainers.fridh ]; 42 43 }; 44 45}