on iko/ghcjs-patch-master help sign in
Enabled fast-weak for reflex
commitc82a0063b3ca0a08b038689f28ee94628cb8a93b authoriko <ilyakooo0@gmail.com> dateFri 3 Dec 2021, 15:33 (5 years ago) parentcc35ee6
1 file changed+5−2
overlays/haskell.nix+5−2
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