Skip to content

Commit

Permalink
Nixpkgs work around for strip on aarch64-darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Mar 17, 2023
1 parent 49e77eb commit b7e8bc1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions compiler/ghc/default.nix
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b7e8bc1

Please sign in to comment.