Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ec3f150744e8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6c7abfe5ca0c
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 11, 2020

  1. ghcHEAD: bump to 8.11.20200403 (#84217)

    * ghcHEAD: bump to 8.11.20200403
    
    * ghcHead: reduce diff vs. 8.10.1
    
    dontAddExtraLibs was removed by accident (IMO) in ea19a8e
    
    * ghcHEAD: add ability to use system libffi
    
    - enable nixpkgs' libffi
    - minimise diffs against 8.10.1
    - remove patching
    
    * remove configure warning about --with-curses-includes
    
    configure: WARNING: unrecognized options: --with-curses-includes
    ggreif authored Apr 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6c7abfe View commit details
Showing with 38 additions and 25 deletions.
  1. +4 −4 doc/languages-frameworks/haskell.section.md
  2. +30 −18 pkgs/development/compilers/ghc/head.nix
  3. +4 −3 pkgs/top-level/haskell-packages.nix
8 changes: 4 additions & 4 deletions doc/languages-frameworks/haskell.section.md
Original file line number Diff line number Diff line change
@@ -101,10 +101,10 @@ to compile your Haskell packages with any GHC version you please. The following
command displays the complete list of available compilers:
```
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
haskell.compiler.ghc8101 ghc-8.10.0.20191210
haskell.compiler.integer-simple.ghc8101 ghc-8.10.0.20191210
haskell.compiler.ghcHEAD ghc-8.10.20191119
haskell.compiler.integer-simple.ghcHEAD ghc-8.10.20191119
haskell.compiler.ghc8101 ghc-8.10.1
haskell.compiler.integer-simple.ghc8101 ghc-8.10.1
haskell.compiler.ghcHEAD ghc-8.11.20200403
haskell.compiler.integer-simple.ghcHEAD ghc-8.11.20200403
haskell.compiler.ghc822Binary ghc-8.2.2-binary
haskell.compiler.ghc844 ghc-8.4.4
haskell.compiler.ghc863Binary ghc-8.6.3-binary
48 changes: 30 additions & 18 deletions pkgs/development/compilers/ghc/head.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,17 @@

# build-tools
, bootPkgs
, autoconf, autoreconfHook, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx
, bash

, libiconv ? null, ncurses

, # GHC can be built with system libffi or a bundled one.
libffi ? null

, enableDwarf ? !stdenv.targetPlatform.isDarwin &&
!stdenv.targetPlatform.isWindows, elfutils # for DWARF support
!stdenv.targetPlatform.isWindows
, elfutils # for DWARF support

, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
, # LLVM is conceptually a run-time-only depedendency, but for
@@ -18,7 +22,8 @@

, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
, gmp

, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
@@ -30,7 +35,7 @@
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows

, version ? "8.10.20191119"
, version ? "8.11.20200403"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
@@ -75,6 +80,7 @@ let

# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
++ stdenv.lib.optional enableDwarf elfutils;
@@ -97,17 +103,14 @@ stdenv.mkDerivation (rec {

src = fetchgit {
url = "https://gitlab.haskell.org/ghc/ghc.git/";
rev = "0418c38d55c7a47967187dce2db5ea2ab1021b1e";
sha256 = "1d8g30ii0w4xh6fh61bxbalsqqyanny99nn3p727fx7favnhgvxi";
rev = "4291bddaea3148908c55f235ee8978e1d9aa6f20";
sha256 = "1gs3mxmsdpsgsp7vnawx8mys0qwg4x2zhfrbciy3wv8nv13ar1af";
};

enableParallelBuilding = true;

outputs = [ "out" "doc" ];

patches = [
];

postPatch = "patchShebangs .";

# GHC is a bit confused on its cross terminology.
@@ -130,8 +133,8 @@ stdenv.mkDerivation (rec {
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo ${version} >VERSION
echo ${src.rev} >GIT_COMMIT_ID
echo ${version} > VERSION
echo ${src.rev} > GIT_COMMIT_ID
./boot
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -161,31 +164,40 @@ stdenv.mkDerivation (rec {
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";

# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
"--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optionals (libffi != null) [
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals useLdGold [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
] ++ stdenv.lib.optionals enableDwarf [
] ++ stdenv.lib.optional disableLargeAddressSpace "--disable-large-address-space"
++ stdenv.lib.optionals enableDwarf [
"--enable-dwarf-unwind"
"--with-libdw-includes=${stdenv.lib.getDev elfutils}/include"
"--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib"
];

# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;

# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;

nativeBuildInputs = [
perl autoconf autoreconfHook automake m4 python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
7 changes: 4 additions & 3 deletions pkgs/top-level/haskell-packages.nix
Original file line number Diff line number Diff line change
@@ -81,10 +81,11 @@ in {
llvmPackages = pkgs.llvmPackages_9;
};
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs = packages.ghc865Binary;
bootPkgs = packages.ghc883; # no binary yet
inherit (buildPackages.python3Packages) sphinx;
buildLlvmPackages = buildPackages.llvmPackages_6;
llvmPackages = pkgs.llvmPackages_6;
buildLlvmPackages = buildPackages.llvmPackages_9;
llvmPackages = pkgs.llvmPackages_9;
libffi = pkgs.libffi;
};
ghcjs = compiler.ghcjs86;
ghcjs86 = callPackage ../development/compilers/ghcjs-ng {