Skip to content

Commit

Permalink
GHCJS darwin fixes (#41120)
Browse files Browse the repository at this point in the history
* GHCJS darwin fixes

* Fix ghcjs 80 and 710 packages

* Add socket-io to ghcjs 82 and 84 passthru
  • Loading branch information
ElvishJerricco authored and xeji committed May 29, 2018
1 parent b02b464 commit 7a23f1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion pkgs/development/compilers/ghcjs-ng/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
, xorg
, gmp
, pkgconfig
, gcc
, lib
, nodePackages
, ghcjsDepOverrides ? (_:_:{})
}:

Expand All @@ -40,6 +42,8 @@ let
inherit (bootGhcjs) version;
isGhcjs = true;

socket-io = nodePackages."socket.io";

# Relics of the old GHCJS build system
stage1Packages = [];
mkStage2 = _: {};
Expand All @@ -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";
Expand All @@ -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 = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/top-level/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
};
Expand Down

0 comments on commit 7a23f1a

Please sign in to comment.