forked from rarias/jungle
Add cudatoolkit to PATH
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
symlinkJoin,
|
||||
zlib,
|
||||
|
||||
cudaPackages,
|
||||
cudaPackages ? null,
|
||||
enableCuda ? true,
|
||||
}:
|
||||
|
||||
@@ -228,6 +228,7 @@ stdenv.mkDerivation {
|
||||
|
||||
passthru = {
|
||||
inherit llvmMajorVersion;
|
||||
inherit enableCuda cudaPackages;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
wrapCCWith,
|
||||
llvm-intel-unwrapped,
|
||||
gcc,
|
||||
@@ -11,6 +12,10 @@ let
|
||||
cc:
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
extraPath = builtins.concatStringsSep ":" (
|
||||
[ "${gcc.cc}/bin" ] ++ lib.optionals cc.enableCuda [ "${cc.cudaPackages.cudatoolkit}/bin" ]
|
||||
);
|
||||
in
|
||||
wrapCCWith {
|
||||
inherit cc;
|
||||
@@ -40,7 +45,7 @@ let
|
||||
extraBuildCommands = ''
|
||||
# FIXME: We should find a better way to modify the PATH instead of using
|
||||
# this ugly hack. See https://jungle.bsc.es/git/rarias/bscpkgs/issues/9
|
||||
echo 'path_backup="${gcc.cc}/bin:$path_backup"' >>$out/nix-support/cc-wrapper-hook
|
||||
echo 'path_backup="${extraPath}:$path_backup"' >>$out/nix-support/cc-wrapper-hook
|
||||
|
||||
# Disable hardening by default
|
||||
echo "" > $out/nix-support/add-hardening.sh
|
||||
|
||||
Reference in New Issue
Block a user