Skip to content

Commit a4ff702

Browse files
committed
Port overlays from master
The overlay files themselves have changed a lot in master, from being renamed to having bugs in them be solved.
1 parent 9ae791c commit a4ff702

File tree

5 files changed

+135
-48
lines changed

5 files changed

+135
-48
lines changed

nix/overlay-ghc902.nix

Lines changed: 0 additions & 33 deletions
This file was deleted.

nix/overlay-ghc910.nix

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{ pkgs }:
2+
final: prev:
3+
let
4+
inherit (pkgs.haskell.lib) dontCheck doJailbreak markUnbroken;
5+
in
6+
{
7+
# Use an older version than the default in nixpkgs. Since rewrite-inspector
8+
# is basically abandonware it catches fire with brick 1.0+.
9+
brick = doJailbreak prev.brick_0_70_1;
10+
11+
# brick 0.70.1 requires vty < 6.0.
12+
vty = doJailbreak (prev.callHackage "vty" "5.39" { });
13+
14+
# Relies on older versions of some libraries.
15+
hint = doJailbreak prev.hint;
16+
17+
# Marked as broken in nixpkgs, since it specifies much older dependencies
18+
# than the defaults in nixpkgs.
19+
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);
20+
21+
# Requires some old versions of libraries, but still works.
22+
derive-storable-plugin = doJailbreak prev.derive-storable-plugin;
23+
24+
# Marken as broken, but compiles anyway.
25+
hedgehog-fakedata = doJailbreak (markUnbroken prev.hedgehog-fakedata);
26+
27+
# Fails on GHC 9.10 with:
28+
# library/Text/Regex/PCRE/Heavy.hs:123: failure in expression `head $ scan [re|\s*entry (\d+) (\w+)\s*&?|] (" entry 1 hello &entry 2 hi" :: String)'
29+
# expected: (" entry 1 hello &",["1","hello"])
30+
# but got: <interactive>:55:1: warning: [GHC-63394] [-Wx-partial]
31+
# ^
32+
# In the use of ‘head’
33+
# (imported from Prelude.Compat, but defined in GHC.Internal.List):
34+
# "This is a partial function, it throws an error on empty lists. Use pattern matching, 'Data.List.uncons' or 'Data.Maybe.listToMaybe' instead. Consider refactoring to use "Data.List.NonEmpty"."
35+
# (" entry 1 hello &",["1","hello"])
36+
37+
pcre-heavy = dontCheck prev.pcre-heavy;
38+
39+
# Relies on older versions of text.
40+
string-random = doJailbreak prev.string-random;
41+
42+
# We need the newest version from nixpkgs for these packages.
43+
singletons-base = prev.singletons-base_3_4;
44+
45+
microstache = prev.microstache_1_0_3;
46+
47+
th-desugar = prev.th-desugar_1_17;
48+
49+
# We need a new tasty-flaky. The one from Hackage doesn't build for some weird
50+
# reason..
51+
tasty-flaky = prev.callCabal2nix "tasty-flaky" (pkgs.fetchFromGitHub {
52+
owner = "LaurentRDC";
53+
repo = "tasty-flaky";
54+
rev = "fc31a9d622c1eb60030a50152258a9bef785e365";
55+
sha256 = "sha256-irLM3aVMxpBgsM72ArulMXcoLY2glalVkG//Lrj2JBI=";
56+
}) {};
57+
58+
tasty = prev.tasty_1_5;
59+
60+
singletons-th = prev.singletons-th_3_4;
61+
62+
# nixplgs doesn't include revision 1, changing dependency on template-haskell.
63+
string-interpolate = pkgs.haskell.lib.compose.overrideCabal (drv: {
64+
revision = "1";
65+
editedCabalFile = "sha256-oh0tR+LDFcVzQnm4kSrmhAU+P7wdai536d72Cvhzipg=";
66+
}) (prev.callHackageDirect {
67+
pkg = "string-interpolate";
68+
ver = "0.3.4.0";
69+
sha256 = "sha256-KA8P6cc6N7pZ9/ay3edcEGx4vpKtp+EY7tn8U1NrbG8=";
70+
} { });
71+
}
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{ pkgs }:
22
final: prev:
33
let
4-
inherit (pkgs.haskell.lib) doJailbreak dontCheck markUnbroken;
4+
inherit (pkgs.haskell.lib) doJailbreak markUnbroken dontCheck;
55
in
66
{
77
# Use an older version than the default in nixpkgs. Since rewrite-inspector
88
# is basically abandonware it catches fire with brick 1.0+.
99
brick = doJailbreak prev.brick_0_70_1;
1010

11+
vty = prev.callHackage "vty" "5.39" { };
12+
13+
# Marked as broken in nixpkgs, since it needs on a newer hashable than the
14+
# .cabal file currently uploaded to hackage.
15+
concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply);
1116

1217
# Use a branch with changes to support GHC 9.6.1.
1318
hint =
@@ -25,28 +30,18 @@ in
2530
# than the defaults in nixpkgs.
2631
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);
2732

28-
# We want a version that matches with singletons-th, but the tests in here
29-
# are also a bit flaky since GHC 9.6 isn't officially supported.
30-
singletons-base = dontCheck prev.singletons-base_3_2;
31-
32-
# Use a newer version than the default in nixpkgs.
33-
singletons-th = prev.singletons-th_3_2;
34-
3533
# Needs a newer text than the .cabal file currently uploaded to hackage.
3634
string-qq = doJailbreak prev.string-qq;
3735

38-
# Needs a newer version than the default in nixpkgs.
39-
th-desugar = prev.th-desugar_1_15;
40-
4136
# Needs a newer base than the .cabal file currently uploaded to hackage.
4237
vector-binary-instances = doJailbreak prev.vector-binary-instances;
4338

44-
# Use an older version than the default in nixpkgs.
45-
th-abstraction = prev.th-abstraction_0_5_0_0;
46-
4739
# type-errors 0.2.0.2 is bounded on doctest >=0.16.0.1 && <0.22
4840
doctest = prev.callHackage "doctest" "0.21.1" { };
4941

42+
# Marken as broken, but compiles anyway.
43+
hedgehog-fakedata = doJailbreak (markUnbroken prev.hedgehog-fakedata);
44+
5045
# We need a new tasty-flaky. The one from Hackage doesn't build for some weird
5146
# reason..
5247
tasty-flaky = prev.callCabal2nix "tasty-flaky" (pkgs.fetchFromGitHub {
@@ -55,4 +50,15 @@ in
5550
rev = "fc31a9d622c1eb60030a50152258a9bef785e365";
5651
sha256 = "sha256-irLM3aVMxpBgsM72ArulMXcoLY2glalVkG//Lrj2JBI=";
5752
}) {};
53+
54+
# This version of tasty isn't available in the nix ghc96 package set
55+
tasty = prev.callHackageDirect {
56+
pkg = "tasty";
57+
ver = "1.5.3";
58+
sha256 = "sha256-Ogd8J4aHNeL+xmcRWuJeGBNaePyLs5yo1IoMzvWrVPY=";
59+
} {};
60+
61+
# The tests (not the package itself!) require a tasty <1.5, which won't work as we pull in
62+
# tasty 1.5.3. Solution: don't test!
63+
time-compat = dontCheck prev.time-compat;
5864
}

nix/overlay-ghc98.nix

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{ pkgs }:
2+
final: prev:
3+
let
4+
inherit (pkgs.haskell.lib) doJailbreak markUnbroken dontCheck;
5+
in
6+
{
7+
# Use an older version than the default in nixpkgs. Since rewrite-inspector
8+
# is basically abandonware it catches fire with brick 1.0+.
9+
brick = doJailbreak prev.brick_0_70_1;
10+
11+
# brick 0.70.1 requires vty < 6.0.
12+
vty = doJailbreak (prev.callHackage "vty" "5.39" { });
13+
14+
# Marked as broken in nixpkgs, since it specifies much older dependencies
15+
# than the defaults in nixpkgs.
16+
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);
17+
18+
# Requires some old versions of libraries, but still works.
19+
derive-storable-plugin = doJailbreak prev.derive-storable-plugin;
20+
21+
# Marken as broken, but compiles anyway.
22+
hedgehog-fakedata = doJailbreak (markUnbroken prev.hedgehog-fakedata);
23+
24+
# We need a new tasty-flaky. The one from Hackage doesn't build for some weird
25+
# reason..
26+
tasty-flaky = prev.callCabal2nix "tasty-flaky" (pkgs.fetchFromGitHub {
27+
owner = "LaurentRDC";
28+
repo = "tasty-flaky";
29+
rev = "fc31a9d622c1eb60030a50152258a9bef785e365";
30+
sha256 = "sha256-irLM3aVMxpBgsM72ArulMXcoLY2glalVkG//Lrj2JBI=";
31+
}) {};
32+
33+
# This version of tasty isn't available in the nix ghc96 package set
34+
tasty = prev.callHackageDirect {
35+
pkg = "tasty";
36+
ver = "1.5.3";
37+
sha256 = "sha256-Ogd8J4aHNeL+xmcRWuJeGBNaePyLs5yo1IoMzvWrVPY=";
38+
} {};
39+
40+
# The tests (not the package itself!) require a tasty <1.5, which won't work as we pull in
41+
# tasty 1.5.3. Solution: don't test!
42+
time-compat = dontCheck prev.time-compat;
43+
}

nix/overlay.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ let
194194
"clash-testsuite"
195195
../tests
196196
"--flag workaround-ghc-mmap-crash" {
197-
inherit (hfinal) clash-cores clash-ghc clash-lib clash-prelude;
197+
inherit (hfinal) clash-ghc clash-lib clash-prelude;
198198
};
199199
in
200200
unmodified.overrideAttrs (old: {

0 commit comments

Comments
 (0)