mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
Possible fix for nix 2.4 issue (#1461)
This commit is contained in:
parent
93ab6221f2
commit
60919c5cc1
@ -108,16 +108,19 @@ in rec {
|
||||
(ghcName: ghc: builtins.mapAttrs
|
||||
(pkgName: subDir: rec {
|
||||
src =
|
||||
# TODO remove once nix >=2.4 is widely adopted (will trigger rebuilds of everything).
|
||||
# See https://github.com/input-output-hk/haskell.nix/issues/1459
|
||||
let nix24srcFix = src: src // { filterPath = { path, ... }: path; };
|
||||
# Add in the generated files needed by ghc-boot
|
||||
if subDir == "libraries/ghc-boot"
|
||||
then final.evalPackages.runCommand "ghc-boot-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
|
||||
in if subDir == "libraries/ghc-boot"
|
||||
then nix24srcFix (final.evalPackages.runCommand "ghc-boot-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
|
||||
mkdir $out
|
||||
lndir -silent ${ghc.passthru.configured-src}/${subDir} $out
|
||||
lndir -silent ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC $out/GHC
|
||||
''
|
||||
'')
|
||||
else if subDir == "compiler"
|
||||
then final.haskell-nix.haskellLib.cleanSourceWith {
|
||||
src = final.evalPackages.runCommand "ghc-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
|
||||
src = nix24srcFix (final.evalPackages.runCommand "ghc-src" { nativeBuildInputs = [final.evalPackages.xorg.lndir]; } ''
|
||||
mkdir $out
|
||||
lndir -silent ${ghc.passthru.configured-src} $out
|
||||
if [[ -f ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Version.hs ]]; then
|
||||
@ -137,7 +140,7 @@ in rec {
|
||||
fi
|
||||
ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler
|
||||
ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler
|
||||
'';
|
||||
'');
|
||||
inherit subDir;
|
||||
includeSiblings = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user