git.iko.soy/typeable/nixpkgs
on master help sign in
ghc: Normalize derivations
commit9ce15ea60c8a93753d20a06d7f3dae6c867f7d10 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 18 May 2018, 19:33 (9 years ago) parent63e5b3c
5 files changed+30−15
pkgs/development/compilers/ghc/7.10.3.nix+5−2 pkgs/development/compilers/ghc/8.0.2.nix+7−1 pkgs/development/compilers/ghc/8.2.2.nix+6−5 pkgs/development/compilers/ghc/8.4.2.nix+7−5 pkgs/development/compilers/ghc/head.nix+5−2
pkgs/development/compilers/ghc/7.10.3.nix+5−2
@@ -68,7 +68,6 @@ let
6868 targetCC = builtins.head toolsForTarget;
6969
7070in
71−
7271stdenv.mkDerivation rec {
7372 version = "7.10.3";
7473 name = "${targetPrefix}ghc-${version}";
@@ -87,6 +86,8 @@ stdenv.mkDerivation rec {
8786 ./relocation.patch
8887 ];
8988
89+ postPatch = "patchShebangs .";
90+
9091 # GHC is a bit confused on its cross terminology.
9192 preConfigure = ''
9293 for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -103,6 +104,7 @@ stdenv.mkDerivation rec {
103104 export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
104105 export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
105106 export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
107+
106108 echo -n "${buildMK}" > mk/build.mk
107109 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
108110 '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -135,7 +137,8 @@ stdenv.mkDerivation rec {
135137 crossConfig = true;
136138
137139 nativeBuildInputs = [
138− ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour
140+ perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42
141+ ghc hscolour
139142 ];
140143
141144 # For building runtime libs
pkgs/development/compilers/ghc/8.0.2.nix+7−1
@@ -87,6 +87,8 @@ stdenv.mkDerivation rec {
8787 ++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch
8888 ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
8989
90+ postPatch = "patchShebangs .";
91+
9092 # GHC is a bit confused on its cross terminology.
9193 preConfigure = ''
9294 for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -103,6 +105,7 @@ stdenv.mkDerivation rec {
103105 export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
104106 export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
105107 export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
108+
106109 echo -n "${buildMK}" > mk/build.mk
107110 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
108111 '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -134,7 +137,10 @@ stdenv.mkDerivation rec {
134137 # masss-rebuild.
135138 crossConfig = true;
136139
137− nativeBuildInputs = [ ghc perl hscolour sphinx ];
140+ nativeBuildInputs = [
141+ perl sphinx
142+ ghc hscolour
143+ ];
138144
139145 # For building runtime libs
140146 depsBuildTarget = toolsForTarget;
pkgs/development/compilers/ghc/8.2.2.nix+6−5
@@ -23,10 +23,8 @@
2323
2424, # Whether to build dynamic libs for the standard library (on the target
2525 # platform). Static libs are always built.
26− enableShared ?
27− !(targetPlatform.isDarwin
28− # On iOS, dynamic linking is not supported
29− && (targetPlatform.isAarch64 || targetPlatform.isAarch32))
26+ enableShared ? true
27+
3028, # Whether to backport https://phabricator.haskell.org/D4388 for
3129 # deterministic profiling symbol names, at the cost of a slightly
3230 # non-standard GHC API
@@ -153,7 +151,10 @@ stdenv.mkDerivation rec {
153151 # masss-rebuild.
154152 crossConfig = true;
155153
156− nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
154+ nativeBuildInputs = [
155+ autoconf autoreconfHook automake perl python3 sphinx
156+ ghc alex happy hscolour
157+ ];
157158
158159 # For building runtime libs
159160 depsBuildTarget = toolsForTarget;
pkgs/development/compilers/ghc/8.4.2.nix+7−5
@@ -3,7 +3,7 @@
33
44# build-tools
55, bootPkgs, alex, happy
6−, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3
6+, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4
77
88, libffi, libiconv ? null, ncurses
99
@@ -15,7 +15,7 @@
1515
1616, # If enabled, GHC will be built with the GPL-free but slower integer-simple
1717 # library instead of the faster but GPLed integer-gmp library.
18− enableIntegerSimple ? false, gmp ? null, m4
18+ enableIntegerSimple ? false, gmp ? null
1919
2020, # If enabled, use -fPIC when compiling static libs.
2121 enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@@ -24,7 +24,6 @@
2424 # platform). Static libs are always built.
2525 enableShared ? !targetPlatform.useAndroidPrebuilt
2626
27−, version ? "8.4.2"
2827}:
2928
3029assert !enableIntegerSimple -> gmp != null;
@@ -69,7 +68,7 @@ let
6968
7069in
7170stdenv.mkDerivation rec {
72− inherit version;
71+ version = "8.4.2";
7372 name = "${targetPrefix}ghc-${version}";
7473
7574 src = fetchurl {
@@ -144,7 +143,10 @@ stdenv.mkDerivation rec {
144143 # masss-rebuild.
145144 crossConfig = true;
146145
147− nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
146+ nativeBuildInputs = [
147+ perl autoconf automake m4 python3
148+ ghc alex happy
149+ ];
148150
149151 # For building runtime libs
150152 depsBuildTarget = toolsForTarget;
pkgs/development/compilers/ghc/head.nix+5−2
@@ -3,7 +3,7 @@
33
44# build-tools
55, bootPkgs, alex, happy
6−, autoconf, automake, coreutils, fetchgit, perl, python3
6+, autoconf, automake, coreutils, fetchgit, perl, python3, m4
77
88, libffi, libiconv ? null, ncurses
99
@@ -141,7 +141,10 @@ stdenv.mkDerivation rec {
141141 # masss-rebuild.
142142 crossConfig = true;
143143
144− nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
144+ nativeBuildInputs = [
145+ perl autoconf automake m4 python3
146+ ghc alex happy
147+ ];
145148
146149 # For building runtime libs
147150 depsBuildTarget = toolsForTarget;