ghc 8.2.2, head: Inline common* bindings

Cross case purposely changed as it will be rewritten anyways. But no
native hashes should be changed.
This commit is contained in:
John Ericson 2017-09-10 14:50:00 -04:00
parent a224dfc253
commit faa4b45a1e
2 changed files with 29 additions and 42 deletions

View File

@ -23,18 +23,8 @@ let
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
commonPreConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString enableIntegerSimple ''
echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
'';
in stdenv.mkDerivation (rec {
in
stdenv.mkDerivation (rec {
inherit version;
name = "ghc-${version}";
@ -45,9 +35,19 @@ in stdenv.mkDerivation (rec {
postPatch = "patchShebangs .";
preConfigure = commonPreConfigure;
preConfigure = ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString enableIntegerSimple ''
echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk
'';
buildInputs = commonBuildInputs;
buildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
enableParallelBuilding = true;
@ -102,10 +102,6 @@ in stdenv.mkDerivation (rec {
} // stdenv.lib.optionalAttrs (cross != null) {
name = "${cross.config}-ghc-${version}";
preConfigure = commonPreConfigure + ''
sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk
'';
configureFlags = [
"CC=${stdenv.cc}/bin/${cross.config}-cc"
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
@ -118,8 +114,6 @@ in stdenv.mkDerivation (rec {
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
stdenv.lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
buildInputs = commonBuildInputs;
configurePlatforms = [];
passthru = {

View File

@ -26,20 +26,6 @@ let
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
commonPreConfigure = ''
echo ${version} >VERSION
echo ${rev} >GIT_COMMIT_ID
./boot
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString enableIntegerSimple ''
echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
'';
in
stdenv.mkDerivation (rec {
inherit version rev;
@ -53,9 +39,22 @@ stdenv.mkDerivation (rec {
postPatch = "patchShebangs .";
preConfigure = commonPreConfigure;
preConfigure = ''
echo ${version} >VERSION
echo ${rev} >GIT_COMMIT_ID
./boot
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString enableIntegerSimple ''
echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk
'';
buildInputs = commonBuildInputs;
buildInputs = [ ghc perl autoconf automake happy alex python3 ];
enableParallelBuilding = true;
@ -110,10 +109,6 @@ stdenv.mkDerivation (rec {
} // stdenv.lib.optionalAttrs (cross != null) {
name = "${cross.config}-ghc-${version}";
preConfigure = commonPreConfigure + ''
sed 's|#BuildFlavour = quick-cross|BuildFlavour = perf-cross|' mk/build.mk.sample > mk/build.mk
'';
configureFlags = [
"CC=${stdenv.cc}/bin/${cross.config}-cc"
"LD=${stdenv.cc.bintools}/bin/${cross.config}-ld"
@ -126,8 +121,6 @@ stdenv.mkDerivation (rec {
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
stdenv.lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
buildInputs = commonBuildInputs;
configurePlatforms = [];
passthru = {