Skip to content

Commit

Permalink
Synchronize Haskell infrastructure with 'master' at b923fd5.
Browse files Browse the repository at this point in the history
  • Loading branch information
peti committed Mar 2, 2017
1 parent 5435ad7 commit aa4a99c
Show file tree
Hide file tree
Showing 11 changed files with 6,822 additions and 2,494 deletions.
7 changes: 5 additions & 2 deletions pkgs/development/compilers/ghc/8.0.2.nix
@@ -1,9 +1,10 @@
{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
{ stdenv, lib, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
, hscolour, patchutils, sphinx

# If enabled GHC will be build with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
, enableIntegerSimple ? false, gmp
, cross ? null
}:

let
Expand Down Expand Up @@ -44,7 +45,9 @@ stdenv.mkDerivation rec {
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional stdenv.isDarwin [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
];
] ++
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";

# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/compilers/ghc/head.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
{ stdenv, lib, fetchgit, bootPkgs, perl, ncurses, libiconv, binutils, coreutils
, autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform
, selfPkgs, cross ? null

Expand Down Expand Up @@ -105,7 +105,9 @@ in stdenv.mkDerivation (rec {
"RANLIB=${stdenv.binutilsCross}/bin/${cross.config}-ranlib"
"--target=${cross.config}"
"--enable-bootstrap-with-devel-snapshot"
];
] ++
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";

buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutilsCross ];

Expand Down
10 changes: 9 additions & 1 deletion pkgs/development/compilers/ghcjs/base.nix
@@ -1,4 +1,5 @@
{ mkDerivation
, lib
, broken ? false
, test-framework
, test-framework-hunit
Expand Down Expand Up @@ -94,6 +95,11 @@
]

, stage2 ? import ./stage2.nix

, patches ? [ ./ghcjs.patch ]

# used for resolving compiler plugins
, ghcLibdir ? null
}:
let
inherit (bootPkgs) ghc;
Expand Down Expand Up @@ -122,7 +128,7 @@ in mkDerivation (rec {
testDepends = [
HUnit test-framework test-framework-hunit
];
patches = [ ./ghcjs.patch ];
inherit patches;
postPatch = ''
substituteInPlace Setup.hs \
--replace "/usr/bin/env" "${coreutils}/bin/env"
Expand Down Expand Up @@ -165,6 +171,8 @@ in mkDerivation (rec {
--with-cabal ${cabal-install}/bin/cabal \
--with-gmp-includes ${gmp.dev}/include \
--with-gmp-libraries ${gmp.out}/lib
'' + lib.optionalString (ghcLibdir != null) ''
printf '%s' '${ghcLibdir}' > "$out/lib/ghcjs-${version}/ghc_libdir"
'';
passthru = {
inherit bootPkgs;
Expand Down
33 changes: 10 additions & 23 deletions pkgs/development/haskell-modules/configuration-common.nix
Expand Up @@ -59,14 +59,13 @@ self: super: {
# Link the proper version.
zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; };

# The Hackage tarball is purposefully broken. Mr. Hess wants people to build
# his package from the Git repo because that is, like, better!
# The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
# https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
git-annex = ((overrideCabal super.git-annex (drv: {
src = pkgs.fetchFromGitHub {
owner = "joeyh";
repo = "git-annex";
sha256 = "0f79i2i1cr8j02vc4ganw92prbkv9ca1yl9jgkny0rxf28wdlc6v";
rev = drv.version;
src = pkgs.fetchgit {
url = "git://git-annex.branchable.com/";
rev = "refs/tags/" + drv.version;
sha256 = "0irvzwpwxxdy6qs7jj81r6qk7i1gkkqyaza4wcm0phyyn07yh2sz";
};
}))).override {
dbus = if pkgs.stdenv.isLinux then self.dbus else null;
Expand Down Expand Up @@ -700,22 +699,6 @@ self: super: {
# The latest Hoogle needs versions not yet in LTS Haskell 7.x.
hoogle = super.hoogle.override { haskell-src-exts = self.haskell-src-exts_1_19_1; };

# To be in sync with Hoogle.
lambdabot-haskell-plugins = (overrideCabal super.lambdabot-haskell-plugins (drv: {
patches = [
(pkgs.fetchpatch {
url = "https://github.com/lambdabot/lambdabot/commit/78a2361024724acb70bc1c12c42f3a16015bb373.patch";
sha256 = "0aw0jpw07idkrg8pdn3y3qzhjfrxsvmx3plg51m1aqgbzs000yxf";
stripLen = 2;
addPrefixes = true;
})
];

jailbreak = true;
})).override {
haskell-src-exts = self.haskell-src-exts-simple;
};

# Needs new version.
haskell-src-exts-simple = super.haskell-src-exts-simple.override { haskell-src-exts = self.haskell-src-exts_1_19_1; };

Expand Down Expand Up @@ -883,4 +866,8 @@ self: super: {

# https://github.com/dan-t/cabal-lenses/issues/6
cabal-lenses = doJailbreak super.cabal-lenses;

# https://github.com/snoyberg/yaml/issues/106
yaml = disableCabalFlag super.yaml "system-libyaml";

}
4 changes: 4 additions & 0 deletions pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
Expand Up @@ -42,6 +42,10 @@ self: super: {
# Build jailbreak-cabal with the latest version of Cabal.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_24_2_0; };

gtk2hs-buildtools = super.gtk2hs-buildtools.override { Cabal = self.Cabal_1_24_2_0; };

megaparsec = addBuildDepend super.megaparsec self.fail;

Extra = appendPatch super.Extra (pkgs.fetchpatch {
url = "https://github.com/seereason/sr-extra/commit/29787ad4c20c962924b823d02a7335da98143603.patch";
sha256 = "193i1xmq6z0jalwmq0mhqk1khz6zz0i1hs6lgfd7ybd6qyaqnf5f";
Expand Down

0 comments on commit aa4a99c

Please sign in to comment.