Skip to content

Commit 3a2a83b

Browse files
lf-cydparser
authored andcommitted
Export an overlay that does not override the package set
1 parent d5dbec8 commit 3a2a83b

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

flake.nix

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@
150150
with haskell.lib; {
151151
# Patches don't apply
152152
github = overrideCabal hsuper.github (drv: { patches = []; });
153-
hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {};
153+
# Tests are broken on 9.2 and 9.4, and we wind up bypassing the
154+
# nixpkgs fixes to the test suite by doing this override. So just
155+
# turn it off.
156+
hiedb = haskell.lib.dontCheck (hsuper.callCabal2nix "hiedb" inputs.hiedb {});
154157
hw-prim = hsuper.callCabal2nix "hw-prim" inputs.hw-prim {};
155158
retrie = hsuper.callCabal2nix "retrie" inputs.retrie {};
156159
retrie_1_1_0_0 = hsuper.callCabal2nix "retrie" inputs.retrie-1100 {};
@@ -182,21 +185,28 @@
182185
builtins.mapAttrs (_: haskell.lib.dontCheck)
183186
(overlay hself hsuper);
184187

185-
extended = hpkgs: hpkgs.override (old: {
188+
applyHaskellOverlays = overlays: hpkgs: hpkgs.override (old: {
186189
overrides =
187190
lib.fold
188191
lib.composeExtensions
189192
(old.overrides or (_: _: { }))
190-
[ haskellOverrides
191-
(dontCheck (haskell.lib.packageSourceOverrides hlsSources))
192-
tweaks
193-
];
193+
overlays;
194194
});
195+
196+
extended = forHlsCI:
197+
applyHaskellOverlays
198+
(prev.lib.optional forHlsCI haskellOverrides
199+
++ [ (dontCheck (haskell.lib.packageSourceOverrides hlsSources))
200+
tweaks
201+
]
202+
);
195203
in {
196204
inherit hlsSources;
197205

198206
# Haskell packages extended with our packages
199-
hlsHpkgs = compiler: extended haskell.packages.${compiler};
207+
hlsHpkgs = compiler: extended true haskell.packages.${compiler};
208+
# Haskell packages extended with our packages; reusing the nixpkgs set as much as possible
209+
hlsHpkgsNixpkgs = compiler: extended false haskell.packages.${compiler};
200210

201211
# Support of GenChangelogs.hs
202212
gen-hls-changelogs = hpkgs:

0 commit comments

Comments
 (0)