pycuda: init at 2016.1

This commit is contained in:
artuuge 2016-06-15 00:47:55 +02:00
parent dd5a46f85d
commit be0ade9d03
3 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,21 @@
{ mkDerivation
, fetchFromGitHub
}:
mkDerivation rec {
name = "compyte-${version}";
version = "git-20150817";
src = fetchFromGitHub {
owner = "inducer";
repo = "compyte";
rev = "ac1c71d46428c14aa1bd1c09d7da19cd0298d5cc";
sha256 = "1980h017qi52b7fqwm75m481xs2napgdd3fbrzkfc29k085cbign";
};
installPhase = ''
mkdir -p $out
cp -r * $out
'';
}

View File

@ -0,0 +1,66 @@
{ buildPythonPackage
, fetchFromGitHub
, boost
, numpy
, pytools
, pytest
, decorator
, appdirs
, six
, cudatoolkit
, python
, mkDerivation
, stdenv
}:
let
compyte = import ./compyte.nix {
inherit mkDerivation fetchFromGitHub;
};
in
buildPythonPackage rec {
name = "pycuda-${version}";
version = "2016.1";
src = fetchFromGitHub {
owner = "inducer";
repo = "pycuda";
rev = "609817e22c038249f5e9ddd720b3ca5a9d58ca11";
sha256 = "0kg6ayxsw2gja9rqspy6z8ihacf9jnxr8hzywjwmj1izkv24cff7";
};
preConfigure = ''
findInputs ${boost} boost_dirs propagated-native-build-inputs
export BOOST_INCLUDEDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep '\-dev')/include
export BOOST_LIBRARYDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep -v '\-dev')/lib
${python.interpreter} configure.py --boost-inc-dir=$BOOST_INCLUDEDIR \
--boost-lib-dir=$BOOST_LIBRARYDIR \
--no-use-shipped-boost \
--boost-python-libname=boost_python
'';
postInstall = ''
ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte
'';
propagatedBuildInputs = [
numpy
pytools
pytest
decorator
appdirs
six
cudatoolkit
compyte
python
];
meta = with stdenv.lib; {
homepage = https://github.com/inducer/pycuda/;
description = "CUDA integration for Python.";
license = licenses.mit;
maintainers = with maintainers; [ artuuge ];
};
}

View File

@ -7508,6 +7508,11 @@ in modules // {
};
};
pycuda = callPackage ../development/python-modules/pycuda rec {
cudatoolkit = pkgs.cudatoolkit75;
inherit (pkgs.stdenv) mkDerivation;
};
python-axolotl = buildPythonPackage rec {
name = "python-axolotl-${version}";
version = "0.1.7";