2014-07-14 12:21:41 +01:00
|
|
|
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
|
|
|
|
2013-03-25 10:39:50 +00:00
|
|
|
{ cabal, c2hs, cudatoolkit, nvidia_x11 }:
|
2012-05-20 18:38:03 +01:00
|
|
|
|
|
|
|
cabal.mkDerivation (self: {
|
|
|
|
pname = "cuda";
|
2014-12-12 08:48:47 +00:00
|
|
|
version = "0.6.5.1";
|
|
|
|
sha256 = "04j57inw4wmd0l74ryxdgpjcbf3zkklgkqw9bv7yp4n96n40mp0y";
|
|
|
|
isLibrary = true;
|
|
|
|
isExecutable = true;
|
2012-05-20 18:38:03 +01:00
|
|
|
buildTools = [ c2hs ];
|
|
|
|
extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ];
|
2013-03-08 11:44:46 +00:00
|
|
|
doCheck = false;
|
2012-05-20 18:38:03 +01:00
|
|
|
# Perhaps this should be the default in cabal.nix ...
|
|
|
|
#
|
|
|
|
# The cudatoolkit provides both 64 and 32-bit versions of the
|
|
|
|
# library. GHC's linker fails if the wrong version is found first.
|
|
|
|
# We solve this by eliminating lib64 from the path on 32-bit
|
|
|
|
# platforms and putting lib64 first on 64-bit platforms.
|
|
|
|
libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib";
|
|
|
|
configurePhase = ''
|
|
|
|
for i in Setup.hs Setup.lhs; do
|
|
|
|
test -f $i && ghc --make $i
|
|
|
|
done
|
2013-02-25 00:58:19 +00:00
|
|
|
for p in $extraBuildInputs $propagatedNativeBuildInputs; do
|
2012-05-20 18:38:03 +01:00
|
|
|
if [ -d "$p/include" ]; then
|
|
|
|
extraLibDirs="$extraLibDirs --extra-include-dir=$p/include"
|
|
|
|
fi
|
|
|
|
for d in $libPaths; do
|
|
|
|
if [ -d "$p/$d" ]; then
|
|
|
|
extraLibDirs="$extraLibDirs --extra-lib-dir=$p/$d"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags
|
|
|
|
'';
|
|
|
|
meta = {
|
2013-11-06 14:47:45 +00:00
|
|
|
homepage = "https://github.com/tmcdonell/cuda";
|
2012-05-20 18:38:03 +01:00
|
|
|
description = "FFI binding to the CUDA interface for programming NVIDIA GPUs";
|
|
|
|
license = self.stdenv.lib.licenses.bsd3;
|
2013-12-02 19:24:58 +00:00
|
|
|
platforms = self.ghc.meta.platforms;
|
2014-05-12 13:31:31 +01:00
|
|
|
hydraPlatforms = self.stdenv.lib.platforms.none;
|
2012-05-20 18:38:03 +01:00
|
|
|
};
|
|
|
|
})
|