Skip to content

Commit c45c70f

Browse files
committed
Fixes for ghcjs 8.10.7
1 parent aa50765 commit c45c70f

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

lib/ghcjs-project.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ let
147147
index-state = "2021-03-20T00:00:00Z";
148148
inherit compiler-nix-name;
149149
configureArgs = pkgs.lib.optionalString (isGhcjs88 && !isGhcjs810) "--constraint='Cabal >=3.0.2.0 && <3.1'";
150+
# set use-host-template-haskell. This *does*
151+
# work as we use a patched ghc to boot anyway.
152+
# (we apply https://github.com/ghcjs/ghc/commit/2918d88d4ef786b5f2801f6f77ac333cc56dde75 already)
153+
cabalProjectLocal = ''
154+
package ghcjs
155+
flags: +use-host-template-haskell +no-wrapper-install
156+
package ghc-api-ghcjs
157+
flags: +use-host-template-haskell
158+
package ghcjs-th
159+
flags: +use-host-template-haskell
160+
'';
150161
# If a package is in both build-depends and build-tool-depends multiple versions may
151162
# be in the `plan.json` file. Haskell.nix will pick the newer one, but when nbuilding
152163
# ghcjs 8.6 we need to use the older happy version.
@@ -162,13 +173,6 @@ let
162173
packages.ghcjs.doHaddock = false;
163174
packages.haddock-ghcjs.doHaddock = false;
164175
packages.haddock-api-ghcjs.doHaddock = false;
165-
packages.ghcjs.flags.no-wrapper-install = true;
166-
# set use-host-template-haskell. This *does*
167-
# work as we use a patched ghc to boot anyway.
168-
# (we apply https://github.com/ghcjs/ghc/commit/2918d88d4ef786b5f2801f6f77ac333cc56dde75 already)
169-
packages.ghcjs.flags.use-host-template-haskell = true;
170-
packages.ghc-api-ghcjs.flags.use-host-template-haskell = true;
171-
packages.ghcjs-th.flags.use-host-template-haskell = true;
172176
packages.ghc.flags.ghci = true;
173177
packages.ghci.flags.ghci = true;
174178
# packages.ghcjs.components.library.configureFlags = [ "-fno-wrapper-install" ];

materialized/ghcjs/ghc8107/default.nix

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/ghcjs/ghc8107/plan.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

overlays/haskell.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,12 @@ final: prev: {
771771
}) plan-json.install-plan);
772772
});
773773
modules = [({config, pkgs, ...}: {
774-
nonReinstallablePkgs = ["rts"] ++ final.lib.optionals (pkgs.stdenv.hostPlatform.isGhcjs) ([
774+
nonReinstallablePkgs = ["rts" "base" "ghc-prim" "integer-gmp" "integer-simple"]
775+
++ final.lib.optionals (builtins.compareVersions config.compiler.version "8.11" >= 0) [
776+
"ghc-bignum"]
777+
++ final.lib.optionals (builtins.compareVersions config.compiler.version "9.9" >= 0) [
778+
"ghc-internal"]
779+
++ final.lib.optionals (pkgs.stdenv.hostPlatform.isGhcjs) ([
775780
# ghci and its dependencies
776781
"ghci" "binary" "bytestring" "containers" "template-haskell" "array" "deepseq" "filepath" "ghc-boot" "ghc-boot-th" "ghc-heap" "transformers" "unix" "directory" "time" "ghc-platform" "os-string"
777782
] ++ final.lib.optionals (builtins.compareVersions config.compiler.version "8.11" < 0) [

0 commit comments

Comments
 (0)