1{ pkgs, haskellLib }:
2
3let
4 inherit (pkgs) lib;
5in
6
7with haskellLib;
8
9# cabal2nix doesn't properly add dependencies conditional on arch(javascript)
10
11(self: super: {
12 ghcjs-base = addBuildDepends (with self; [
13 aeson
14 attoparsec
15 dlist
16 hashable
17 primitive
18 scientific
19 unordered-containers
20 vector
21 ]) super.ghcjs-base;
22
23 ghcjs-dom = addBuildDepend self.ghcjs-dom-javascript super.ghcjs-dom;
24 ghcjs-dom-javascript = addBuildDepend self.ghcjs-base super.ghcjs-dom-javascript;
25 jsaddle = addBuildDepend self.ghcjs-base super.jsaddle;
26 jsaddle-dom = addBuildDepend self.ghcjs-base super.jsaddle-dom;
27 jsaddle-warp = overrideCabal (drv: {
28 libraryHaskellDepends = [ ];
29 testHaskellDepends = [ ];
30 }) super.jsaddle-warp;
31
32 entropy = addBuildDepend self.ghcjs-dom super.entropy;
33
34 # https://gitlab.haskell.org/ghc/ghc/-/issues/25083#note_578275
35 patch = haskellLib.disableParallelBuilding super.patch;
36 reflex-dom-core = haskellLib.disableParallelBuilding super.reflex-dom-core;
37
38 reflex-dom = super.reflex-dom.override (drv: {
39 jsaddle-webkit2gtk = null;
40 });
41
42 miso-examples = pkgs.lib.pipe super.miso-examples [
43 (addBuildDepends (
44 with self;
45 [
46 aeson
47 ghcjs-base
48 jsaddle-warp
49 miso
50 servant
51 ]
52 ))
53 ];
54
55 # https://github.com/haskellari/splitmix/pull/75
56 splitmix = appendPatch (pkgs.fetchpatch {
57 url = "https://github.com/haskellari/splitmix/commit/7ffb3158f577c48ab5de774abea47767921ef3e9.patch";
58 sha256 = "sha256-n2q4FGf/pPcI1bhb9srHjHLzaNVehkdN6kQgL0F4MMg=";
59 }) super.splitmix;
60
61 # See https://gitlab.haskell.org/ghc/ghc/-/issues/26019#note_621324, without this flag the build OOMs
62 SHA = haskellLib.appendConfigureFlag "--ghc-option=-fignore-interface-pragmas" super.SHA;
63})