Factor out bootGhcjs for justStaticExecutables sake
This commit is contained in:
parent
9326126fdd
commit
2a32834ad9
@ -35,7 +35,7 @@ let
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
targetPrefix = "";
|
targetPrefix = "";
|
||||||
inherit (passthru.bootPkgs.ghcjs) version;
|
inherit (bootGhcjs) version;
|
||||||
isGhcjs = true;
|
isGhcjs = true;
|
||||||
|
|
||||||
# Relics of the old GHCJS build system
|
# Relics of the old GHCJS build system
|
||||||
@ -43,15 +43,24 @@ let
|
|||||||
mkStage2 = _: {};
|
mkStage2 = _: {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
|
||||||
libexec =
|
libexec =
|
||||||
if builtins.compareVersions passthru.bootPkgs.ghcjs.version "8.3" <= 0
|
if builtins.compareVersions bootGhcjs.version "8.3" <= 0
|
||||||
then "${passthru.bootPkgs.ghcjs}/bin"
|
then "${bootGhcjs}/bin"
|
||||||
else "${passthru.bootPkgs.ghcjs}/libexec/${stdenv.system}-${passthru.bootPkgs.ghc.name}/${passthru.bootPkgs.ghcjs.name}";
|
else "${bootGhcjs}/libexec/${stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "ghcjs";
|
name = "ghcjs";
|
||||||
src = passthru.configuredSrc;
|
src = passthru.configuredSrc;
|
||||||
nativeBuildInputs = [passthru.bootPkgs.ghcjs passthru.bootPkgs.ghc cabal-install nodejs makeWrapper xorg.lndir gmp];
|
nativeBuildInputs = [
|
||||||
|
bootGhcjs
|
||||||
|
passthru.bootPkgs.ghc
|
||||||
|
cabal-install
|
||||||
|
nodejs
|
||||||
|
makeWrapper
|
||||||
|
xorg.lndir
|
||||||
|
gmp
|
||||||
|
];
|
||||||
phases = ["unpackPhase" "buildPhase"];
|
phases = ["unpackPhase" "buildPhase"];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export HOME=$TMP
|
export HOME=$TMP
|
||||||
@ -61,7 +70,7 @@ in stdenv.mkDerivation {
|
|||||||
mkdir -p $out/libexec
|
mkdir -p $out/libexec
|
||||||
lndir ${libexec} $out/bin
|
lndir ${libexec} $out/bin
|
||||||
|
|
||||||
wrapProgram $out/bin/ghcjs --add-flags "-B$out/libexec"
|
wrapProgram $out/bin/ghcjs --add-flags "-B$out/libexec -dcore-lint"
|
||||||
wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/libexec"
|
wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/libexec"
|
||||||
wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/libexec/package.conf.d"
|
wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/libexec/package.conf.d"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user