Fix GHCJS 8.4/8.2 in sandboxed builds (#41411)
This commit is contained in:
parent
0644b4d948
commit
ea52ca64e8
@ -6,6 +6,8 @@
|
|||||||
, cabal-install
|
, cabal-install
|
||||||
, gmp
|
, gmp
|
||||||
, runCommand
|
, runCommand
|
||||||
|
, lib
|
||||||
|
, stdenv
|
||||||
|
|
||||||
, ghc
|
, ghc
|
||||||
, happy
|
, happy
|
||||||
@ -20,15 +22,18 @@ runCommand "configured-ghcjs-src" {
|
|||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
python3
|
python3
|
||||||
gcc
|
|
||||||
ghc
|
ghc
|
||||||
happy
|
happy
|
||||||
alex
|
alex
|
||||||
cabal-install
|
cabal-install
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
gcc # https://github.com/ghcjs/ghcjs/issues/663
|
||||||
];
|
];
|
||||||
inherit ghcjsSrc;
|
inherit ghcjsSrc;
|
||||||
} ''
|
} ''
|
||||||
export HOME=$(pwd)
|
export HOME=$(pwd)
|
||||||
|
mkdir $HOME/.cabal
|
||||||
|
touch $HOME/.cabal/config
|
||||||
cp -r "$ghcjsSrc" "$out"
|
cp -r "$ghcjsSrc" "$out"
|
||||||
chmod -R +w "$out"
|
chmod -R +w "$out"
|
||||||
cd "$out"
|
cd "$out"
|
||||||
|
@ -50,13 +50,10 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
|
bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
|
||||||
libexec =
|
libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin"] ["osx"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
|
||||||
if builtins.compareVersions bootGhcjs.version "8.3" <= 0
|
|
||||||
then "${bootGhcjs}/bin"
|
|
||||||
else "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin"] ["osx"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "ghcjs";
|
name = bootGhcjs.name;
|
||||||
src = passthru.configuredSrc;
|
src = passthru.configuredSrc;
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
bootGhcjs
|
bootGhcjs
|
||||||
@ -73,6 +70,8 @@ in stdenv.mkDerivation {
|
|||||||
phases = ["unpackPhase" "buildPhase"];
|
phases = ["unpackPhase" "buildPhase"];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export HOME=$TMP
|
export HOME=$TMP
|
||||||
|
mkdir $HOME/.cabal
|
||||||
|
touch $HOME/.cabal/config
|
||||||
cd lib/boot
|
cd lib/boot
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user