From daa97965e10084840e428d6e1db258c2567aefa3 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 23 Jul 2024 18:51:24 -0400 Subject: [PATCH] Revert "haskell-builder.nix: work around useSystemCoreFoundationFramework hook" This reverts commit e14e9647d7f929d9d63c4cb69bea39010a2d4d76. --- .../haskell-modules/generic-builder.nix | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index f3439e19bdd4..6c60efe1bce5 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -150,35 +150,6 @@ assert stdenv.hostPlatform.isWasm -> enableStaticLibraries == false; let - # This is a workaround for the 2024-07-20 staging-next cycle to avoid causing mass rebuilds. - # todo(@reckenrode) Remove this workaround and remove `NIX_COREFOUNDATION_RPATH`, the related hooks, and ld-wrapper support. - nixCoreFoundationRpathWorkaround = stdenv.mkDerivation { - name = "nix-corefoundation-rpath-workaround"; - buildCommand = '' - mkdir -p "$out/nix-support" - cat <<-EOF > "$out/nix-support/setup-hook" - removeUseSystemCoreFoundationFrameworkHook() { - unset NIX_COREFOUNDATION_RPATH - local _hook - for _hook in envBuildBuildHooks envBuildHostHooks envBuildTargetHooks envHostHostHooks envHostTargetHooks envTargetTargetHooks; do - local _index=0 - local _var="\$_hook[@]" - for _var in "\''${!_var}"; do - if [ "\$_var" = "useSystemCoreFoundationFramework" ]; then - unset "\$_hook[\$_index]" - fi - ((++_index)) - done - unset _index - unset _var - done - unset _hook - } - addEnvHooks "\$hostOffset" removeUseSystemCoreFoundationFrameworkHook - EOF - ''; - }; - inherit (lib) optional optionals optionalString versionAtLeast concatStringsSep enableFeature optionalAttrs; @@ -459,8 +430,7 @@ stdenv.mkDerivation ({ inherit depsBuildBuild nativeBuildInputs; buildInputs = otherBuildInputs ++ optionals (!isLibrary) propagatedBuildInputs # For patchShebangsAuto in fixupPhase - ++ optionals stdenv.hostPlatform.isGhcjs [ nodejs ] - ++ optionals (stdenv.isDarwin && stdenv.isx86_64) [ nixCoreFoundationRpathWorkaround ]; + ++ optionals stdenv.hostPlatform.isGhcjs [ nodejs ]; propagatedBuildInputs = optionals isLibrary propagatedBuildInputs; LANG = "en_US.UTF-8"; # GHC needs the locale configured during the Haddock phase.