3
0
Fork 0
forked from mirrors/nixpkgs

GHCJS darwin fixes (#41120)

* GHCJS darwin fixes

* Fix ghcjs 80 and 710 packages

* Add socket-io to ghcjs 82 and 84 passthru
This commit is contained in:
Will Fancher 2018-05-29 17:39:21 -04:00 committed by xeji
parent b02b464852
commit 7a23f1acca
2 changed files with 9 additions and 3 deletions

View file

@ -14,7 +14,9 @@
, xorg
, gmp
, pkgconfig
, gcc
, lib
, nodePackages
, ghcjsDepOverrides ? (_:_:{})
}:
@ -40,6 +42,8 @@ let
inherit (bootGhcjs) version;
isGhcjs = true;
socket-io = nodePackages."socket.io";
# Relics of the old GHCJS build system
stage1Packages = [];
mkStage2 = _: {};
@ -49,7 +53,7 @@ let
libexec =
if builtins.compareVersions bootGhcjs.version "8.3" <= 0
then "${bootGhcjs}/bin"
else "${bootGhcjs}/libexec/${stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
else "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin"] ["osx"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
in stdenv.mkDerivation {
name = "ghcjs";
@ -63,6 +67,8 @@ in stdenv.mkDerivation {
xorg.lndir
gmp
pkgconfig
] ++ lib.optionals stdenv.isDarwin [
gcc # https://github.com/ghcjs/ghcjs/issues/663
];
phases = ["unpackPhase" "buildPhase"];
buildPhase = ''

View file

@ -159,13 +159,13 @@ in rec {
ghcjs = packages.ghcjs82;
ghcjs710 = callPackage ../development/haskell-modules rec {
buildHaskellPackages = ghc.bootPkgs;
ghc = bh.compiler.ghcjs;
ghc = bh.compiler.ghcjs710;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
};
ghcjs80 = callPackage ../development/haskell-modules rec {
buildHaskellPackages = ghc.bootPkgs;
ghc = bh.compiler.ghcjsHEAD;
ghc = bh.compiler.ghcjs80;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };
};