tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
haskell.compiler.ghcjs: fix build with aeson 2.0
sternenseemann
3 years ago
fde2e98a
7ae9629c
+34
-4
2 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
ghcjs
8.10
common-overrides.nix
default.nix
+32
-3
pkgs/development/compilers/ghcjs/8.10/common-overrides.nix
···
1
1
-
{ haskellLib }:
1
1
+
{ haskellLib, fetchpatch, buildPackages }:
2
2
3
3
-
let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak;
3
3
+
let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak markUnbroken overrideCabal;
4
4
in self: super: {
5
5
-
ghcjs = doJailbreak (super.ghcjs.overrideScope (self: super: {
5
5
+
ghcjs = overrideCabal (drv: {
6
6
+
# Jailbreak and patch can be dropped after https://github.com/ghcjs/ghcjs/pull/833
7
7
+
jailbreak = true;
8
8
+
patches = drv.patches or [] ++ [
9
9
+
(fetchpatch {
10
10
+
name = "ghcjs-aeson-2.0.patch";
11
11
+
url = "https://github.com/ghcjs/ghcjs/commit/9ef1f92d740e8503d15d91699f57db147f0474cc.patch";
12
12
+
sha256 = "0cgxcy6b5870bv4kj54n3bzcqinh4gl4w4r78dg43h2mblhkzbnj";
13
13
+
})
14
14
+
];
15
15
+
}) (super.ghcjs.overrideScope (self: super: {
6
16
optparse-applicative = self.optparse-applicative_0_15_1_0;
17
17
+
webdriver = overrideCabal (drv: {
18
18
+
patches = drv.patches or [] ++ [
19
19
+
# Patch for aeson 2.0 which adds a lower bound on it, so we don't apply it globally
20
20
+
# Pending https://github.com/kallisti-dev/hs-webdriver/pull/183
21
21
+
(fetchpatch {
22
22
+
name = "webdriver-aeson-2.0.patch";
23
23
+
url = "https://github.com/georgefst/hs-webdriver/commit/90ded63218da17fc0bd9f9b208b0b3f60b135757.patch";
24
24
+
sha256 = "1xvkk51r2v020xlmci5n1fd1na8raa332lrj7r9f0ijsyfvnqlv0";
25
25
+
excludes = [ "webdriver.cabal" ];
26
26
+
})
27
27
+
];
28
28
+
# Fix line endings so patch applies
29
29
+
prePatch = drv.prePatch or "" + ''
30
30
+
find . -name '*.hs' | xargs "${buildPackages.dos2unix}/bin/dos2unix"
31
31
+
'';
32
32
+
33
33
+
jailbreak = true;
34
34
+
broken = false;
35
35
+
}) super.webdriver;
7
36
}));
8
37
}
+2
-1
pkgs/development/compilers/ghcjs/8.10/default.nix
···
2
2
, pkgsHostHost
3
3
, callPackage
4
4
, fetchgit
5
5
+
, fetchpatch
5
6
, ghcjsSrcJson ? null
6
7
, ghcjsSrc ? fetchgit (lib.importJSON ghcjsSrcJson)
7
8
, bootPkgs
···
36
37
})
37
38
38
39
(callPackage ./common-overrides.nix {
39
39
-
inherit haskellLib;
40
40
+
inherit haskellLib fetchpatch buildPackages;
40
41
})
41
42
ghcjsDepOverrides
42
43
]);