diff options
author | Josef Kemetmüller <josef.kemetmueller@gmail.com> | 2019-02-19 00:48:06 +0100 |
---|---|---|
committer | Josef Kemetmüller <josef.kemetmueller@gmail.com> | 2019-02-19 23:23:16 +0100 |
commit | f4839744897c87a28dc9d34842023aad5f5e60be (patch) | |
tree | cae5d689bb1c124aef27bf1e74d0e20f4d4317fd /pkgs/development/compilers/cudatoolkit/default.nix | |
parent | c8fcd68662d3369c85b5f0d6a7e58774f712d095 (diff) | |
download | nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar.gz nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar.bz2 nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar.lz nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar.xz nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.tar.zst nixpkgs-f4839744897c87a28dc9d34842023aad5f5e60be.zip |
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.
Diffstat (limited to 'pkgs/development/compilers/cudatoolkit/default.nix')
-rw-r--r-- | pkgs/development/compilers/cudatoolkit/default.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index 847c545233e..f0570568f51 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -49,8 +49,6 @@ let rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64"; - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; - unpackPhase = '' sh $src --keep --noexec @@ -70,6 +68,7 @@ let installPhase = '' mkdir $out cd $(basename $src) + export PERL5LIB=. perl ./install-linux.pl --prefix="$out" cd .. for patch in $runPatches; do @@ -84,7 +83,7 @@ let rm -rf $out/lib # 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) if [ -d "$out"/cuda-samples ]; then @@ -138,6 +137,23 @@ let 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 = { cc = gcc; majorVersion = |