haskell-cuda: jump through hoops to make this build succeed
The package has undeclared dependencies on 'nvidia_x11' and 'cudatoolkit', the latter of which also comes with a non-standard directory layout that our builder cannot handle without help. Last but not least, the build hard-codes impure search paths like /usr/local/cuda that need to be patched out. Resolves https://github.com/NixOS/nixpkgs/issues/6562.
This commit is contained in:
parent
d3156d3ca2
commit
aaf09cd216
@ -43,6 +43,20 @@ self: super: {
|
||||
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
|
||||
};
|
||||
|
||||
# CUDA needs help finding the SDK headers and libraries.
|
||||
cuda = overrideCabal super.cuda (drv: {
|
||||
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
|
||||
configureFlags = (drv.configureFlags or []) ++
|
||||
pkgs.lib.optional pkgs.stdenv.is64bit "--extra-lib-dirs=${pkgs.cudatoolkit}/lib64" ++ [
|
||||
"--extra-lib-dirs=${pkgs.cudatoolkit}/lib"
|
||||
"--extra-include-dirs=${pkgs.cudatoolkit}/usr_include"
|
||||
];
|
||||
preConfigure = ''
|
||||
unset CC # unconfuse the haskell-cuda configure script
|
||||
sed -i -e 's|/usr/local/cuda|${pkgs.cudatoolkit}|g' configure
|
||||
'';
|
||||
});
|
||||
|
||||
# Depends on code distributed under a non-free license.
|
||||
bindings-yices = dontDistribute super.bindings-yices;
|
||||
yices = dontDistribute super.yices;
|
||||
|
Loading…
Reference in New Issue
Block a user