haskell.compiler.ghc*: set abs paths for cctools bintools w/ hadrian

Fixes #267250.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
This commit is contained in:
Claudio Bley 2023-11-21 09:21:03 +01:00 committed by sternenseemann
parent 0c086da2bb
commit 2af613b58c

View file

@ -477,6 +477,14 @@ stdenv.mkDerivation ({
preInstall = ''
pushd _build/bindist/*
''
# the bindist configure script uses different env variables than the GHC configure script
# see https://github.com/NixOS/nixpkgs/issues/267250 and https://gitlab.haskell.org/ghc/ghc/-/issues/24211
+ lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
export InstallNameToolCmd=$INSTALL_NAME_TOOL
export OtoolCmd=$OTOOL
''
+ ''
$configureScript $configureFlags "''${configureFlagsArray[@]}"
'';