Skip to content

Commit b68279a

Browse files
committed
Fix TH compilation for GHCJS
1 parent a3380ae commit b68279a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

builder/make-config-files.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
let
66
# Sort and remove duplicates from nonReinstallablePkgs.
77
# That way changes to the order of nonReinstallablePkgs does not require rebuilds.
8-
nonReinstallablePkgs' = __attrNames (lib.genAttrs nonReinstallablePkgs (x: x))
9-
++ component.pre-existing or [];
8+
nonReinstallablePkgs' = __attrNames (lib.genAttrs (component.pre-existing ++ nonReinstallablePkgs) (x: x));
109

1110
ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
1211

overlays/haskell.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,13 @@ final: prev: {
774774
};
775775
}) plan-json.install-plan);
776776
});
777-
modules = [{
778-
preExistingPkgs = [];
779-
}
777+
modules = [({config, pkgs, ...}: {
778+
nonReinstallablePkgs = ["rts"] ++ final.lib.optionals (pkgs.stdenv.hostPlatform.isGhcjs) ([
779+
# ghci and its dependencies
780+
"ghci" "binary" "bytestring" "containers" "template-haskell" "array" "deepseq" "filepath" "ghc-boot" "ghc-boot-th" "ghc-heap" "transformers" "unix" "directory" "time" "ghc-platform" "os-string"
781+
] ++ final.lib.optionals (builtins.compareVersions config.compiler.version "8.11" < 0) [
782+
"ghcjs-prim" "ghcjs-th"]);
783+
})
780784
({config, ...}: {
781785
packages = final.lib.listToAttrs (map (p: {
782786
name = to-key p;

0 commit comments

Comments
 (0)