git.iko.soy/typeable/nixpkgs
on master help sign in
ghc: Normalize derivations
commit6f2f081b90a14f274274f6ce0bce5860057495d1 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 18 May 2018, 19:33 (9 years ago) parentf914fdd
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
@@ -86,6 +86,8 @@ stdenv.mkDerivation rec {
8686 ] ++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
8787 ++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch;
8888
89+ postPatch = "patchShebangs .";
90+
8991 # GHC is a bit confused on its cross terminology.
9092 preConfigure = ''
9193 for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -102,6 +104,7 @@ stdenv.mkDerivation rec {
102104 export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
103105 export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
104106 export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
107+
105108 echo -n "${buildMK}" > mk/build.mk
106109 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
107110 '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -133,7 +136,10 @@ stdenv.mkDerivation rec {
133136 # masss-rebuild.
134137 crossConfig = true;
135138
136− nativeBuildInputs = [ ghc perl hscolour sphinx ];
139+ nativeBuildInputs = [
140+ perl sphinx
141+ ghc hscolour
142+ ];
137143
138144 # For building runtime libs
139145 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
@@ -152,7 +150,10 @@ stdenv.mkDerivation rec {
152150 # masss-rebuild.
153151 crossConfig = true;
154152
155− nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
153+ nativeBuildInputs = [
154+ autoconf autoreconfHook automake perl python3 sphinx
155+ ghc alex happy hscolour
156+ ];
156157
157158 # For building runtime libs
158159 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 {
@@ -143,7 +142,10 @@ stdenv.mkDerivation rec {
143142 # masss-rebuild.
144143 crossConfig = true;
145144
146− nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
145+ nativeBuildInputs = [
146+ perl autoconf automake m4 python3
147+ ghc alex happy
148+ ];
147149
148150 # For building runtime libs
149151 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;