forked from mirrors/nixpkgs
45 lines
847 B
Nix
45 lines
847 B
Nix
{ stdenv
|
|
, fetchPypi
|
|
, buildPythonPackage
|
|
, sphinx
|
|
, pytestcov
|
|
, pytest
|
|
, Mako
|
|
, numpy
|
|
, funcsigs
|
|
, withCuda ? false, pycuda
|
|
, withOpenCL ? true, pyopencl
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "reikna";
|
|
version = "0.7.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "e27af9a202b8cdedd07793abbd3282806ec724aba091a27c76d7ba8284cfd8ba";
|
|
};
|
|
|
|
checkInputs = [ sphinx pytestcov pytest ];
|
|
|
|
propagatedBuildInputs = [ Mako numpy funcsigs ]
|
|
++ stdenv.lib.optional withCuda pycuda
|
|
++ stdenv.lib.optional withOpenCL pyopencl;
|
|
|
|
checkPhase = ''
|
|
py.test
|
|
'';
|
|
|
|
# Requires device
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "GPGPU algorithms for PyCUDA and PyOpenCL";
|
|
homepage = https://github.com/fjarri/reikna;
|
|
license = stdenv.lib.licenses.mit;
|
|
maintainers = [ stdenv.lib.maintainers.fridh ];
|
|
|
|
};
|
|
|
|
}
|