summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/head.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:40:37 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:40:37 -0400
commit18742471aff29270453a540f84d543137ee9d44e (patch)
treed21863fd81db3722e8cac52b52be3dd1c429cf21 /pkgs/development/compilers/ghc/head.nix
parent2e831da76da0a51557975a55dc8a18ebf3401bfb (diff)
parentbbcaf78350d87c4657b1a2451132535467a454eb (diff)
downloadnixlib-18742471aff29270453a540f84d543137ee9d44e.tar
nixlib-18742471aff29270453a540f84d543137ee9d44e.tar.gz
nixlib-18742471aff29270453a540f84d543137ee9d44e.tar.bz2
nixlib-18742471aff29270453a540f84d543137ee9d44e.tar.lz
nixlib-18742471aff29270453a540f84d543137ee9d44e.tar.xz
nixlib-18742471aff29270453a540f84d543137ee9d44e.tar.zst
nixlib-18742471aff29270453a540f84d543137ee9d44e.zip
Merge remote-tracking branch 'upstream/master' into staging
Use newer vagrant from master
Diffstat (limited to 'pkgs/development/compilers/ghc/head.nix')
-rw-r--r--pkgs/development/compilers/ghc/head.nix28
1 files changed, 8 insertions, 20 deletions
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index f37114061daa..c0f1091b04d7 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -3,7 +3,7 @@
 
 # build-tools
 , bootPkgs, alex, happy
-, autoconf, automake, coreutils, fetchgit, perl, python3, m4
+, autoconf, automake, coreutils, fetchgit, perl, python3
 
 , libffi, libiconv ? null, ncurses
 
@@ -22,15 +22,9 @@
 
 , # Whether to build dynamic libs for the standard library (on the target
   # platform). Static libs are always built.
-  enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt
-
-, # Whetherto build terminfo.
-  enableTerminfo ? !targetPlatform.isWindows
+  enableShared ? !targetPlatform.useAndroidPrebuilt
 
 , version ? "8.5.20180118"
-, # What flavour to build. An empty string indicates no
-  # specific flavour and falls back to ghc default values.
-  ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
 }:
 
 assert !enableIntegerSimple -> gmp != null;
@@ -44,14 +38,11 @@ let
     "${targetPlatform.config}-";
 
   buildMK = ''
-    BuildFlavour = ${ghcFlavour}
-    ifneq \"\$(BuildFlavour)\" \"\"
-    include mk/flavours/\$(BuildFlavour).mk
-    endif
     DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
   '' + stdenv.lib.optionalString enableIntegerSimple ''
     INTEGER_LIBRARY = integer-simple
   '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    BuildFlavour = perf-cross
     Stage1Only = YES
     HADDOCK_DOCS = NO
     BUILD_SPHINX_HTML = NO
@@ -64,9 +55,9 @@ let
   '';
 
   # Splicer will pull out correct variations
-  libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
+  libDeps = platform: [ ncurses ]
     ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+    ++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
 
   toolsForTarget =
     if hostPlatform == buildPlatform then
@@ -132,7 +123,7 @@ stdenv.mkDerivation rec {
     "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
   ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
     "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
-  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+  ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
     "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
   ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
     "--enable-bootstrap-with-devel-snapshot"
@@ -148,10 +139,7 @@ stdenv.mkDerivation rec {
   # Make sure we never relax`$PATH` and hooks support for compatability.
   strictDeps = true;
 
-  nativeBuildInputs = [
-    perl autoconf automake m4 python3
-    ghc alex happy
-  ];
+  nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
 
   # For building runtime libs
   depsBuildTarget = toolsForTarget;
@@ -173,7 +161,7 @@ stdenv.mkDerivation rec {
   # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
   # treat that as a unary `{x,y,z,..}` repetition.
   postInstall = ''
-    paxmark m $out/lib/${name}/bin/*
+    paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
 
     # Install the bash completion file.
     install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc