summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Hu <me@nickhu.co.uk>2017-07-24 16:39:53 +0100
committerNick Hu <me@nickhu.co.uk>2017-07-24 16:55:11 +0100
commit34beeac70b01e23e8c021f26c52202072d3c561b (patch)
tree840cfb6946200b1e0be6279a4a33e9dc3e5a5c0c
parent1dd6e7dcbc4ea5ac71815e95b050b45c046d7745 (diff)
downloadnixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar.gz
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar.bz2
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar.lz
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar.xz
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.tar.zst
nixpkgs-34beeac70b01e23e8c021f26c52202072d3c561b.zip
fix haskellPackages.cuda and some tools dependent on cudatoolkit
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index 7b9dbcdaa79..a0af66ea182 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -64,8 +64,19 @@ self: super: builtins.intersectAttrs super {
       "--extra-include-dirs=${pkgs.cudatoolkit}/include"
     ];
     preConfigure = ''
-      unset CC          # unconfuse the haskell-cuda configure script
-      sed -i -e 's|/usr/local/cuda|${pkgs.cudatoolkit}|g' configure
+      export CUDA_PATH=${pkgs.cudatoolkit}
+    '';
+  });
+
+  nvvm = overrideCabal super.nvvm (drv: {
+    preConfigure = ''
+      export CUDA_PATH=${pkgs.cudatoolkit}
+    '';
+  });
+
+  cufft = overrideCabal super.cufft (drv: {
+    preConfigure = ''
+      export CUDA_PATH=${pkgs.cudatoolkit}
     '';
   });