diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 6f27d3dd3f..53991594a3 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -265,24 +265,6 @@ let else "lib/${targetPrefix}ghc-${ghc-version}" + lib.optionalString (useHadrian) "/lib"; packageConfDir = "${libDir}/package.conf.d"; -in -stdenv.mkDerivation (rec { - version = ghc-version; - name = "${targetPrefix}ghc-${version}"; - - inherit src configureFlags; - patches = ghc-patches; - - # configure was run by configured-src already. - phases = [ "unpackPhase" "patchPhase" ] - ++ lib.optional (ghc-patches != []) "autoreconfPhase" - ++ [ "configurePhase" "buildPhase" - "checkPhase" "installPhase" - "fixupPhase" - "installCheckPhase" - "distPhase" - ]; - # This work around comes from nixpkgs/pkgs/development/compilers/ghc # # Sometimes we have to dispatch between the bintools wrapper and the unwrapped @@ -303,6 +285,24 @@ stdenv.mkDerivation (rec { else targetCC.bintools.bintools; }; +in +stdenv.mkDerivation (rec { + version = ghc-version; + name = "${targetPrefix}ghc-${version}"; + + inherit src configureFlags; + patches = ghc-patches; + + # configure was run by configured-src already. + phases = [ "unpackPhase" "patchPhase" ] + ++ lib.optional (ghc-patches != []) "autoreconfPhase" + ++ [ "configurePhase" "buildPhase" + "checkPhase" "installPhase" + "fixupPhase" + "installCheckPhase" + "distPhase" + ]; + # GHC is a bit confused on its cross terminology. preConfigure = # This code is only included when cross compiling as it breaks aarch64-darwin native compilation