cudatoolkit: Fix building of older versions
Versions prior to 9.0 did not build. Additionally we add some smoke tests for the binaries in $out/bin.
This commit is contained in:
parent
c8fcd68662
commit
f483974489
@ -49,8 +49,6 @@ let
|
|||||||
|
|
||||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
sh $src --keep --noexec
|
sh $src --keep --noexec
|
||||||
|
|
||||||
@ -70,6 +68,7 @@ let
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cd $(basename $src)
|
cd $(basename $src)
|
||||||
|
export PERL5LIB=.
|
||||||
perl ./install-linux.pl --prefix="$out"
|
perl ./install-linux.pl --prefix="$out"
|
||||||
cd ..
|
cd ..
|
||||||
for patch in $runPatches; do
|
for patch in $runPatches; do
|
||||||
@ -84,7 +83,7 @@ let
|
|||||||
rm -rf $out/lib
|
rm -rf $out/lib
|
||||||
|
|
||||||
# Remove some cruft.
|
# Remove some cruft.
|
||||||
rm $out/bin/uninstall*
|
${lib.optionalString (lib.versionAtLeast version "7.0") "rm $out/bin/uninstall*"}
|
||||||
|
|
||||||
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
|
# Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
|
||||||
if [ -d "$out"/cuda-samples ]; then
|
if [ -d "$out"/cuda-samples ]; then
|
||||||
@ -138,6 +137,23 @@ let
|
|||||||
done < <(find $out $lib $doc -type f -print0)
|
done < <(find $out $lib $doc -type f -print0)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
postInstallCheck = let
|
||||||
|
in ''
|
||||||
|
# Smoke test binaries
|
||||||
|
pushd $out/bin
|
||||||
|
for f in *; do
|
||||||
|
case $f in
|
||||||
|
crt) continue;;
|
||||||
|
nvcc.profile) continue;;
|
||||||
|
nsight_ee_plugins_manage.sh) continue;;
|
||||||
|
uninstall_cuda_toolkit_6.5.pl) continue;;
|
||||||
|
computeprof|nvvp|nsight) continue;; # TODO: Broken
|
||||||
|
*) echo "Executing '$f --version':"; ./$f --version;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
'';
|
||||||
passthru = {
|
passthru = {
|
||||||
cc = gcc;
|
cc = gcc;
|
||||||
majorVersion =
|
majorVersion =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user