Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 17.09-beta 1.4 kB view raw
1{ buildPythonPackage 2, fetchPypi 3, fetchFromGitHub 4, Mako 5, boost 6, numpy 7, pytools 8, pytest 9, decorator 10, appdirs 11, six 12, cudatoolkit 13, python 14, mkDerivation 15, stdenv 16, pythonOlder 17, isPy35 18}: 19let 20 compyte = import ./compyte.nix { 21 inherit mkDerivation fetchFromGitHub; 22 }; 23in 24buildPythonPackage rec { 25 pname = "pycuda"; 26 version = "2017.1.1"; 27 name = "${pname}-${version}"; 28 29 src = fetchPypi { 30 inherit pname version; 31 sha256 = "0qxmcjax32p1ywicw9sha2rvfbak4kjbx9pq57j3wq4cwf296nkb"; 32 }; 33 34 preConfigure = '' 35 ${python.interpreter} configure.py --boost-inc-dir=${boost.dev}/include \ 36 --boost-lib-dir=${boost}/lib \ 37 --no-use-shipped-boost \ 38 --boost-python-libname=boost_python 39 ''; 40 41 postInstall = '' 42 ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte 43 ''; 44 45 # Requires access to libcuda.so.1 which is provided by the driver 46 doCheck = false; 47 48 checkPhase = '' 49 py.test 50 ''; 51 52 propagatedBuildInputs = [ 53 numpy 54 pytools 55 pytest 56 decorator 57 appdirs 58 six 59 cudatoolkit 60 compyte 61 python 62 Mako 63 ]; 64 65 meta = with stdenv.lib; { 66 homepage = https://github.com/inducer/pycuda/; 67 description = "CUDA integration for Python."; 68 license = licenses.mit; 69 maintainers = with maintainers; [ artuuge ]; 70 }; 71 72}