summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAndres Löh <mail@andres-loeh.de>2012-05-20 17:38:03 +0000
committerAndres Löh <mail@andres-loeh.de>2012-05-20 17:38:03 +0000
commit7aa85ac5361b21f6ca31ae0690b63caf464a5641 (patch)
tree2449a7c5dd46e07cfe6a2655234f4c5a3da2daf1 /pkgs/development/compilers
parent920eedb75f8b49ea5ef49008bd1529f4aa134e02 (diff)
downloadnixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar.gz
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar.bz2
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar.lz
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar.xz
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.tar.zst
nixpkgs-7aa85ac5361b21f6ca31ae0690b63caf464a5641.zip
Adding NVIDIA CUDA toolkit and haskell-accelerate-cuda plus deps.
svn path=/nixpkgs/trunk/; revision=34186
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/cudatoolkit/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix
new file mode 100644
index 00000000000..fdb40be320c
--- /dev/null
+++ b/pkgs/development/compilers/cudatoolkit/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib
+, xlibs, fontconfig, freetype, unixODBC, alsaLib
+} :
+
+stdenv.mkDerivation rec {
+  name = "cudatoolkit-4.2.9";
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_64_suse11.2.run;
+        sha256 = "1inngzwq520bhpdfrh5bm4cxfyf3hxj94jialjxgviri5bj9hz60";
+      }
+    else throw "cudatoolkit does not support platform ${stdenv.system}";
+
+  buildInputs = [ perl ];
+
+  runtimeDependencies = [
+    ncurses expat python zlib
+    xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext
+    fontconfig freetype unixODBC alsaLib
+  ];
+
+  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
+
+  unpackPhase = ''
+    sh $src --keep --noexec
+    cd pkg
+  '';
+
+  buildPhase = ''
+    find . -type f -executable -exec patchelf \
+      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      '{}' \; || true
+    find . -type f -exec patchelf \
+      --set-rpath $rpath:$out/lib:$out/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
+      --force-rpath \
+      '{}' \; || true
+  '';
+
+  installPhase = ''
+    mkdir $out
+    perl ./install-linux.pl --prefix="$out"
+  '';
+
+  meta = {
+    license = [ "nonfree" ];
+  };
+}