Merge pull request #43599 from ElvishJerricco/ghcjs-fixes-2018-07-15

Various GHCJS 8.4 fixes
This commit is contained in:
Peter Simons 2018-07-16 09:46:07 +02:00 committed by GitHub
commit 6588e906d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 7 deletions

View file

@ -12,9 +12,10 @@ Updating
---
```
$ nix-prefetch-git https://github.com/ghcjs/ghcjs --rev refs/heads/ghc-8.2 \
$ nix-prefetch-git https://github.com/ghcjs/ghcjs --rev refs/heads/ghc-8.4 \
| jq '{ url, rev, fetchSubmodules, sha256 }' \
> 8.2/git.json
$ cat $(nix-build ../../../.. -A haskell.compiler.ghcjs82.genStage0 --no-out-link) > 8.2/stage0.nix
> 8.4/git.json
$ cat $(nix-build ../../../.. -A haskell.compiler.ghcjs82.genStage0 --no-out-link) > 8.4/stage0.nix
$ cabal2nix --compiler ghcjs git://github.com/ghcjs/ghcjs-base > ghcjs-base.nix
```

View file

@ -18,6 +18,7 @@
, lib
, nodePackages
, ghcjsDepOverrides ? (_:_:{})
, haskell
}:
let
@ -48,7 +49,11 @@ let
# Relics of the old GHCJS build system
stage1Packages = [];
mkStage2 = _: {};
mkStage2 = { callPackage }: {
# https://github.com/ghcjs/ghcjs-base/issues/110
# https://github.com/ghcjs/ghcjs-base/pull/111
ghcjs-base = haskell.lib.dontCheck (haskell.lib.doJailbreak (callPackage ./ghcjs-base.nix {}));
};
haskellCompilerName = "ghcjs-${bootGhcjs.version}";
};

View file

@ -0,0 +1,29 @@
{ mkDerivation, aeson, array, attoparsec, base, binary, bytestring
, containers, deepseq, directory, dlist, fetchgit, ghc-prim
, ghcjs-prim, hashable, HUnit, integer-gmp, primitive, QuickCheck
, quickcheck-unicode, random, scientific, stdenv, test-framework
, test-framework-hunit, test-framework-quickcheck2, text, time
, transformers, unordered-containers, vector
}:
mkDerivation {
pname = "ghcjs-base";
version = "0.2.0.0";
src = fetchgit {
url = "git://github.com/ghcjs/ghcjs-base";
sha256 = "0qr05m0djll3x38dhl85pl798arsndmwfhil8yklhb70lxrbvfrs";
rev = "01014ade3f8f5ae677df192d7c2a208bd795b96c";
};
libraryHaskellDepends = [
aeson attoparsec base binary bytestring containers deepseq dlist
ghc-prim ghcjs-prim hashable integer-gmp primitive scientific text
time transformers unordered-containers vector
];
testHaskellDepends = [
array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit
primitive QuickCheck quickcheck-unicode random test-framework
test-framework-hunit test-framework-quickcheck2 text
];
homepage = "http://github.com/ghcjs/ghcjs-base";
description = "base library for GHCJS";
license = stdenv.lib.licenses.mit;
}

View file

@ -23,6 +23,11 @@ self: super:
};
in stage1 // stage2 // {
# GHCJS does not ship with the same core packages as GHC.
# https://github.com/ghcjs/ghcjs/issues/676
stm = self.stm_2_4_5_0;
ghc-compact = self.ghc-compact_0_1_0_0;
network = addBuildTools super.network (pkgs.lib.optional pkgs.buildPlatform.isDarwin pkgs.buildPackages.darwin.libiconv);
zlib = addBuildTools super.zlib (pkgs.lib.optional pkgs.buildPlatform.isDarwin pkgs.buildPackages.darwin.libiconv);
unix-compat = addBuildTools super.unix-compat (pkgs.lib.optional pkgs.buildPlatform.isDarwin pkgs.buildPackages.darwin.libiconv);
@ -121,7 +126,6 @@ self: super:
});
ghcjs-dom-jsffi = overrideCabal super.ghcjs-dom-jsffi (drv: {
setupHaskellDepends = (drv.setupHaskellDepends or []) ++ [ self.buildHaskellPackages.Cabal_1_24_2_0 ];
libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base self.text ];
isLibrary = true;
});
@ -197,4 +201,11 @@ self: super:
base-orphans = dontCheck super.base-orphans;
distributive = dontCheck super.distributive;
# https://github.com/glguy/th-abstraction/issues/53
th-abstraction = dontCheck super.th-abstraction;
# https://github.com/dreixel/syb/issues/21
syb = dontCheck super.syb;
# https://github.com/ghcjs/ghcjs/issues/677
hspec-core = dontCheck super.hspec-core;
}

View file

@ -84,7 +84,7 @@ in rec {
buildLlvmPackages = buildPackages.llvmPackages_5;
llvmPackages = pkgs.llvmPackages_5;
};
ghcjs = compiler.ghcjs82;
ghcjs = compiler.ghcjs84;
ghcjs710 = packages.ghc7103.callPackage ../development/compilers/ghcjs {
bootPkgs = packages.ghc7103;
inherit (pkgs) cabal-install;
@ -166,7 +166,7 @@ in rec {
ghc = bh.compiler.ghcHEAD;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
};
ghcjs = packages.ghcjs82;
ghcjs = packages.ghcjs84;
ghcjs710 = callPackage ../development/haskell-modules rec {
buildHaskellPackages = ghc.bootPkgs;
ghc = bh.compiler.ghcjs710;