on iko/ghcjs-patch-master help sign in
4 files changed+52−4
since splitsnapshots
unifiedsplit
.github/workflows/rebase.yaml+28 README.md+16 compiler/ghcjs/patches/810/boot-optimization-flags.patch+3−2 overlays/haskell.nix+5−2
.github/workflows/rebase.yamlnew file+28
@@ -0,0 +1,28 @@
1+name: Rebase on iohk/haskell.nix
2+
3+on:
4+ schedule:
5+ - cron: 0 0 * * *
6+
7+jobs:
8+ Linux:
9+ runs-on: ubuntu-latest
10+ steps:
11+ - uses: actions/checkout@v2.4.0
12+ with:
13+ fetch-depth: 0
14+ - name: Rebase and push
15+ run: |
16+ git config --global user.name "GitHub Actions"
17+
18+
19+ git remote add iohk https://github.com/input-output-hk/haskell.nix.git
20+ git fetch iohk
21+
22+ git checkout iko/ghcjs-patch-master
23+ git rebase iohk/master
24+ git push --force
25+
26+ git checkout --track origin/master
27+ git reset --hard iohk/master
28+ git push --force
README.md+16
@@ -1,3 +1,19 @@
1+# What is this fork?
2+
3+This fork contains a patched version of GHCJS 8.10 which improves performance and memory usage.
4+
5+For more info see this PR: https://github.com/input-output-hk/haskell.nix/pull/1306
6+
7+## Package versions
8+
9+This branch is updated every day with commits from https://github.com/input-output-hk/haskell.nix/tree/master. This means that it receives all of the updates the initial project does.
10+
11+## Caching
12+
13+Building the patched compiler itself takes around 2-3 hours. The [Typeable](https://typeable.io) public nix cache probably has a cached version of the compiler. You can follow these instruction to set it up: [app.cachix.org/organization/typeable/cache/typeable](https://app.cachix.org/organization/typeable/cache/typeable).
14+
15+---
16+
117# `haskell.nix` is infrastructure for building Haskell packages with Nix
218
319[![](https://badge.buildkite.com/d453edcd29bd2f8f3f3b32c9b7d6777a33773d9671c37a6ccc.svg?branch=master)](https://buildkite.com/input-output-hk/haskell-dot-nix)
compiler/ghcjs/patches/810/boot-optimization-flags.patch+3−2
@@ -1,13 +1,14 @@
11diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
2−index 2e35a26..1f4ff98 100755
2+index 2e35a26..5db2f9b 100755
33--- a/src-bin/Boot.hs
44+++ b/src-bin/Boot.hs
5−@@ -721,6 +721,8 @@ cabalConfigureFlags = do
5+@@ -721,6 +721,9 @@ cabalConfigureFlags = do
66 , "--prefix", T.pack (locs ^. blGhcjsTopDir)
77 , "--configure-option", "--host=js-unknown-ghcjs"
88 , "--ghcjs-options=-fwrite-ide-info"
99+ , "--ghcjs-options=-O2"
1010+ , "--ghcjs-options=-fexpose-all-unfoldings"
11++ , "--ghcjs-options=-fspecialise-aggressively"
1112 , "--enable-debug-info"
1213 , "--disable-library-stripping"
1314 , "--disable-executable-stripping"
overlays/haskell.nix+5−2
@@ -151,9 +151,11 @@ final: prev: {
151151 else compiler-nix-name';
152152 pkg-def = excludeBootPackages compiler-nix-name plan-pkgs.pkgs;
153153 patchesModule = ghcHackagePatches.${compiler-nix-name-with-js-prefix} or {};
154− package.compiler-nix-name.version = final.buildPackages.haskell-nix.compiler.${compiler-nix-name'}.version;
154+ compilerVersion = final.buildPackages.haskell-nix.compiler.${compiler-nix-name'}.version;
155+ package.compiler-nix-name.version = compilerVersion;
155156 plan.compiler-nix-name.version = final.buildPackages.haskell-nix.compiler.${(plan-pkgs.pkgs hackage).compiler.nix-name}.version;
156157 withMsg = final.lib.assertMsg;
158+ isPatchedGHCJS = final.stdenv.hostPlatform.isGhcjs && builtins.compareVersions compilerVersion "8.10.0.0" >= 0;
157159 in
158160 # Check that the GHC version of the selected compiler matches the one of the plan
159161 assert (withMsg
@@ -175,7 +177,8 @@ final: prev: {
175177 # the plan.
176178 modules = [ { doExactConfig = true; } patchesModule ]
177179 ++ modules
178− ++ plan-pkgs.modules or [];
180+ ++ (plan-pkgs.modules or [])
181+ ++ final.lib.optional isPatchedGHCJS { packages.reflex.flags.fast-weak = true; };
179182 inherit extra-hackages;
180183 };
181184