on iko/ghcjs-patch-master help sign in
.github/workflows/rebase.yamlnew file+28
since splitsnapshots
unifiedsplit
@@ -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+
1# `haskell.nix` is infrastructure for building Haskell packages with Nix
17# `haskell.nix` is infrastructure for building Haskell packages with Nix
2
18
3[![](https://badge.buildkite.com/d453edcd29bd2f8f3f3b32c9b7d6777a33773d9671c37a6ccc.svg?branch=master)](https://buildkite.com/input-output-hk/haskell-dot-nix)
19[![](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 @@
1diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
1diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
2−index 2e35a26..1f4ff98 100755
2+index 2e35a26..5db2f9b 100755
3--- a/src-bin/Boot.hs
3--- a/src-bin/Boot.hs
4+++ b/src-bin/Boot.hs
4+++ b/src-bin/Boot.hs
5−@@ -721,6 +721,8 @@ cabalConfigureFlags = do
5+@@ -721,6 +721,9 @@ cabalConfigureFlags = do
6 , "--prefix", T.pack (locs ^. blGhcjsTopDir)
6 , "--prefix", T.pack (locs ^. blGhcjsTopDir)
7 , "--configure-option", "--host=js-unknown-ghcjs"
7 , "--configure-option", "--host=js-unknown-ghcjs"
8 , "--ghcjs-options=-fwrite-ide-info"
8 , "--ghcjs-options=-fwrite-ide-info"
9+ , "--ghcjs-options=-O2"
9+ , "--ghcjs-options=-O2"
10+ , "--ghcjs-options=-fexpose-all-unfoldings"
10+ , "--ghcjs-options=-fexpose-all-unfoldings"
11++ , "--ghcjs-options=-fspecialise-aggressively"
11 , "--enable-debug-info"
12 , "--enable-debug-info"
12 , "--disable-library-stripping"
13 , "--disable-library-stripping"
13 , "--disable-executable-stripping"
14 , "--disable-executable-stripping"
overlays/haskell.nix+5−2
@@ -151,9 +151,11 @@ final: prev: {
151 else compiler-nix-name';
151 else compiler-nix-name';
152 pkg-def = excludeBootPackages compiler-nix-name plan-pkgs.pkgs;
152 pkg-def = excludeBootPackages compiler-nix-name plan-pkgs.pkgs;
153 patchesModule = ghcHackagePatches.${compiler-nix-name-with-js-prefix} or {};
153 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;
155 plan.compiler-nix-name.version = final.buildPackages.haskell-nix.compiler.${(plan-pkgs.pkgs hackage).compiler.nix-name}.version;
156 plan.compiler-nix-name.version = final.buildPackages.haskell-nix.compiler.${(plan-pkgs.pkgs hackage).compiler.nix-name}.version;
156 withMsg = final.lib.assertMsg;
157 withMsg = final.lib.assertMsg;
158+ isPatchedGHCJS = final.stdenv.hostPlatform.isGhcjs && builtins.compareVersions compilerVersion "8.10.0.0" >= 0;
157 in
159 in
158 # Check that the GHC version of the selected compiler matches the one of the plan
160 # Check that the GHC version of the selected compiler matches the one of the plan
159 assert (withMsg
161 assert (withMsg
@@ -175,7 +177,8 @@ final: prev: {
175 # the plan.
177 # the plan.
176 modules = [ { doExactConfig = true; } patchesModule ]
178 modules = [ { doExactConfig = true; } patchesModule ]
177 ++ modules
179 ++ modules
178− ++ plan-pkgs.modules or [];
180+ ++ (plan-pkgs.modules or [])
181+ ++ final.lib.optional isPatchedGHCJS { packages.reflex.flags.fast-weak = true; };
179 inherit extra-hackages;
182 inherit extra-hackages;
180 };
183 };
181
184