lol

cudatoolkit: remove OpenCL library

libOpenCL is provided by ocl-icd with implementation in NVIDIA driver instead.

+9 -12
+9 -12
pkgs/development/compilers/cudatoolkit/default.nix
··· 22 22 } 23 23 else throw "cudatoolkit does not support platform ${stdenv.system}"; 24 24 25 - outputs = [ "out" "lib" "doc" ]; 25 + outputs = [ "out" "doc" ]; 26 26 27 27 buildInputs = [ perl ]; 28 28 ··· 51 51 patchelf \ 52 52 --set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i 53 53 fi 54 - if [[ $i =~ libOpenCL ]]; then 55 - rpath2= 56 - else 57 - rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64 58 - fi 54 + rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64 59 55 patchelf --set-rpath $rpath2 --force-rpath $i 60 56 done < <(find . -type f -print0) 61 57 ''; ··· 84 80 mkdir -p $out/nix-support 85 81 echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook 86 82 87 - # Move some libraries to the lib output so that programs that 88 - # depend on them don't pull in this entire monstrosity. 89 - mkdir -p $lib/lib 90 - mv -v $out/lib64/libOpenCL* $lib/lib/ 83 + # Remove OpenCL libraries as they are provided by ocl-icd and driver. 84 + rm -f $out/lib64/libOpenCL* 91 85 92 86 '' + lib.optionalString (lib.versionOlder version "8.0") '' 93 87 # Hack to fix building against recent Glibc/GCC. 94 88 echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook 95 89 ''; 96 90 97 - meta = { 98 - license = lib.licenses.unfree; 91 + meta = with stdenv.lib; { 92 + description = "A compiler for NVIDIA GPUs, math libraries, and tools"; 93 + homepage = "https://developer.nvidia.com/cuda-toolkit"; 94 + platforms = platforms.linux; 95 + license = licenses.unfree; 99 96 }; 100 97 }; 101 98