From 52fe43bfe130f0859636d336bb3ba52afb643ea6 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 21 Jul 2025 16:23:53 +0200 Subject: [PATCH] Fix PATH in intel compiler wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to add the gcc in the PATH, but adding it directly to $PATH doesn't work, as it will be restored to $path_backup before icc runs. So for now we simply inject it to path_backup, but ideally we should find a more robust solution. Reviewed-by: Aleix Boné --- pkgs/intel-oneapi/2023.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/intel-oneapi/2023.nix b/pkgs/intel-oneapi/2023.nix index 8b7d3a6..97420b7 100644 --- a/pkgs/intel-oneapi/2023.nix +++ b/pkgs/intel-oneapi/2023.nix @@ -400,7 +400,9 @@ let echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags # Need the gcc in the path - echo 'export "PATH=${mygcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook + # 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="${mygcc}/bin:$path_backup"' >> $out/nix-support/cc-wrapper-hook # Disable hardening by default echo "" > $out/nix-support/add-hardening.sh