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