GHCJS darwin fixes (#41120)

* GHCJS darwin fixes

* Fix ghcjs 80 and 710 packages

* Add socket-io to ghcjs 82 and 84 passthru

authored by

Will Fancher and committed by
xeji
7a23f1ac b02b4648

+9 -3
+7 -1
pkgs/development/compilers/ghcjs-ng/default.nix
··· 14 14 , xorg 15 15 , gmp 16 16 , pkgconfig 17 + , gcc 17 18 , lib 19 + , nodePackages 18 20 , ghcjsDepOverrides ? (_:_:{}) 19 21 }: 20 22 ··· 39 41 inherit bootGhcjs; 40 42 inherit (bootGhcjs) version; 41 43 isGhcjs = true; 44 + 45 + socket-io = nodePackages."socket.io"; 42 46 43 47 # Relics of the old GHCJS build system 44 48 stage1Packages = []; ··· 49 53 libexec = 50 54 if builtins.compareVersions bootGhcjs.version "8.3" <= 0 51 55 then "${bootGhcjs}/bin" 52 - else "${bootGhcjs}/libexec/${stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; 56 + else "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin"] ["osx"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}"; 53 57 54 58 in stdenv.mkDerivation { 55 59 name = "ghcjs"; ··· 63 67 xorg.lndir 64 68 gmp 65 69 pkgconfig 70 + ] ++ lib.optionals stdenv.isDarwin [ 71 + gcc # https://github.com/ghcjs/ghcjs/issues/663 66 72 ]; 67 73 phases = ["unpackPhase" "buildPhase"]; 68 74 buildPhase = ''
+2 -2
pkgs/top-level/haskell-packages.nix
··· 159 159 ghcjs = packages.ghcjs82; 160 160 ghcjs710 = callPackage ../development/haskell-modules rec { 161 161 buildHaskellPackages = ghc.bootPkgs; 162 - ghc = bh.compiler.ghcjs; 162 + ghc = bh.compiler.ghcjs710; 163 163 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { }; 164 164 packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; 165 165 }; 166 166 ghcjs80 = callPackage ../development/haskell-modules rec { 167 167 buildHaskellPackages = ghc.bootPkgs; 168 - ghc = bh.compiler.ghcjsHEAD; 168 + ghc = bh.compiler.ghcjs80; 169 169 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { }; 170 170 packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; 171 171 };