@@ -108,16 +108,19 @@ in rec {
108108 (ghcName: ghc: builtins.mapAttrs
109109 (pkgName: subDir: rec {
110110 src =
111+ # TODO remove once nix >=2.4 is widely adopted (will trigger rebuilds of everything).
112+ # See https://github.com/input-output-hk/haskell.nix/issues/1459
113+ let nix24srcFix = src: src // { filterPath = { path, ... }: path; };
111114 # Add in the generated files needed by ghc-boot
112− if subDir == "libraries/ghc-boot"
113− then final.evalPackages.runCommand "ghc-boot-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
115+ in if subDir == "libraries/ghc-boot"
116+ then nix24srcFix (final.evalPackages.runCommand "ghc-boot-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
114117 mkdir $out
115118 lndir -silent ${ghc.passthru.configured-src}/${subDir} $out
116119 lndir -silent ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC $out/GHC
117− ''
120+ '')
118121 else if subDir == "compiler"
119122 then final.haskell-nix.haskellLib.cleanSourceWith {
120− src = final.evalPackages.runCommand "ghc-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
123+ src = nix24srcFix (final.evalPackages.runCommand "ghc-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
121124 mkdir $out
122125 lndir -silent ${ghc.passthru.configured-src} $out
123126 if [[ -f ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Version.hs ]]; then
@@ -137,7 +140,7 @@ in rec {
137140 fi
138141 ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler
139142 ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler
140− '';
143+ '');
141144 inherit subDir;
142145 includeSiblings = true;
143146 }