3
0
Fork 0
forked from mirrors/nixpkgs

haskell-cuda: re-generate the expression with recent cabal2nix

This commit is contained in:
Peter Simons 2013-03-08 12:44:46 +01:00
parent d96af07c9f
commit e447fcc8dd

View file

@ -7,20 +7,18 @@ cabal.mkDerivation (self: {
buildDepends = [ extensibleExceptions ]; buildDepends = [ extensibleExceptions ];
buildTools = [ c2hs ]; buildTools = [ c2hs ];
extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ]; extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ];
doCheck = false;
# Perhaps this should be the default in cabal.nix ... # Perhaps this should be the default in cabal.nix ...
# #
# The cudatoolkit provides both 64 and 32-bit versions of the # The cudatoolkit provides both 64 and 32-bit versions of the
# library. GHC's linker fails if the wrong version is found first. # library. GHC's linker fails if the wrong version is found first.
# We solve this by eliminating lib64 from the path on 32-bit # We solve this by eliminating lib64 from the path on 32-bit
# platforms and putting lib64 first on 64-bit platforms. # platforms and putting lib64 first on 64-bit platforms.
libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib"; libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib";
configurePhase = '' configurePhase = ''
for i in Setup.hs Setup.lhs; do for i in Setup.hs Setup.lhs; do
test -f $i && ghc --make $i test -f $i && ghc --make $i
done done
for p in $extraBuildInputs $propagatedNativeBuildInputs; do for p in $extraBuildInputs $propagatedNativeBuildInputs; do
if [ -d "$p/include" ]; then if [ -d "$p/include" ]; then
extraLibDirs="$extraLibDirs --extra-include-dir=$p/include" extraLibDirs="$extraLibDirs --extra-include-dir=$p/include"
@ -31,12 +29,8 @@ cabal.mkDerivation (self: {
fi fi
done done
done done
./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags ./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags
''; '';
doCheck = false;
meta = { meta = {
description = "FFI binding to the CUDA interface for programming NVIDIA GPUs"; description = "FFI binding to the CUDA interface for programming NVIDIA GPUs";
license = self.stdenv.lib.licenses.bsd3; license = self.stdenv.lib.licenses.bsd3;