···272 lib.optionalString stdenv.isLinux ''
273 find . -type f -executable -exec patchelf \
274 --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
00000000000000275 '';
276277 # fix for `configure: error: Your linker is affected by binutils #16177`
···272 lib.optionalString stdenv.isLinux ''
273 find . -type f -executable -exec patchelf \
274 --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
275+ '' +
276+ # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path
277+ # substitution. Which can break the build if the store path / prefix happens
278+ # to contain this string. This will be fixed with 9.4 bindists.
279+ # https://gitlab.haskell.org/ghc/ghc/-/issues/21402
280+ ''
281+ # Detect hadrian Makefile by checking for the target that has the problem
282+ if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then
283+ echo Hadrian bindist, applying workaround for xxx path substitution.
284+ # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch
285+ substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0'
286+ else
287+ echo Not a hadrian bindist, not applying xxx path workaround.
288+ fi
289 '';
290291 # fix for `configure: error: Your linker is affected by binutils #16177`
+14
pkgs/development/compilers/ghc/8.10.7-binary.nix
···270 lib.optionalString stdenv.isLinux ''
271 find . -type f -executable -exec patchelf \
272 --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
00000000000000273 '';
274275 # fix for `configure: error: Your linker is affected by binutils #16177`
···270 lib.optionalString stdenv.isLinux ''
271 find . -type f -executable -exec patchelf \
272 --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
273+ '' +
274+ # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path
275+ # substitution. Which can break the build if the store path / prefix happens
276+ # to contain this string. This will be fixed with 9.4 bindists.
277+ # https://gitlab.haskell.org/ghc/ghc/-/issues/21402
278+ ''
279+ # Detect hadrian Makefile by checking for the target that has the problem
280+ if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then
281+ echo Hadrian bindist, applying workaround for xxx path substitution.
282+ # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch
283+ substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0'
284+ else
285+ echo Not a hadrian bindist, not applying xxx path workaround.
286+ fi
287 '';
288289 # fix for `configure: error: Your linker is affected by binutils #16177`
···103 all movement on the battlefield has ceased).'';
104 maintainers = with maintainers; [ kragniz fpletz ];
105 inherit (fpc.meta) platforms;
00000106 };
107}
···103 all movement on the battlefield has ceased).'';
104 maintainers = with maintainers; [ kragniz fpletz ];
105 inherit (fpc.meta) platforms;
106+107+ # Appears to be some sort of C++ linking error.
108+ # Example: https://hydra.nixos.org/build/174544990/nixlog/6
109+ broken = true;
110+ hydraPlatforms = platforms.none;
111 };
112}