Skip to content

Commit 14f7a4b

Browse files
committed
Fix ghcjs and use ln -s instead of cp
1 parent af62a32 commit 14f7a4b

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

builder/comp-builder.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,10 @@ let
585585
fi
586586
'';
587587

588-
#shellHook = ''
589-
# export PATH="${shellWrappers.drv}/bin:$PATH"
590-
# ${shellHookApplied}
591-
#'';
588+
shellHook = ''
589+
export PATH=$ghc/bin:$PATH
590+
${shellHookApplied}
591+
'';
592592
}
593593
// haskellLib.optionalHooks {
594594
# These are the hooks that are not needed by haddock (see commonAttrs for the ones that

builder/ghc-for-component-wrapper.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let
5555
''
5656
# Replace the package database with the one from target package config.
5757
+ ''
58-
cp -r $configFiles/${packageCfgDir} $wrappedGhc/${packageCfgDir}
58+
ln -s $configFiles/${packageCfgDir} $wrappedGhc/${packageCfgDir}
5959
6060
''
6161
# Set the GHC_PLUGINS environment variable according to the plugins for the component.

overlays/default-setup.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99
nonReinstallablePkgs = ["base" "Cabal"];
1010
haskellLib = final.haskell-nix.haskellLib;
1111
defaultSetupSrc =
12-
if final.stdenv.hostPlatform.isGhcjs
12+
if final.stdenv.targetPlatform.isGhcjs
1313
then ../builder/Setup.ghcjs.hs
1414
else ../builder/Setup.hs;
1515
addDefaultSetup = compiler-nix-name: ghc:

overlays/ghcjs.nix

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,6 @@ final: prev:
33
haskell-nix = prev.haskell-nix // ({
44
defaultModules = prev.haskell-nix.defaultModules ++ final.lib.optional final.stdenv.hostPlatform.isGhcjs (
55
({ pkgs, buildModules, config, lib, ... }: {
6-
# Allow Cabal to be reinstalled so that custom setups will use a Cabal
7-
# built with packages.Cabal.patches
8-
nonReinstallablePkgs =
9-
[ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
10-
"deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
11-
"ghcjs-prim" "ghcjs-th"
12-
]
13-
++ lib.optionals (!config.reinstallableLibGhc) [
14-
"ghc-boot"
15-
"ghc" "Win32" "array" "binary" "bytestring" "containers"
16-
"directory" "filepath" "ghc-boot" "ghc-compact" "ghc-prim"
17-
"hpc"
18-
"mtl" "parsec" "process" "text" "time" "transformers"
19-
"unix" "xhtml" "terminfo"
20-
];
216
testWrapper = [((final.writeScriptBin "node-wrapper" ''
227
set -euo pipefail
238
exe=$1

0 commit comments

Comments
 (0)