Skip to content

Commit 6c0b40f

Browse files
committed
Export an overlay that does not override the package set
1 parent b39267a commit 6c0b40f

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
@@ -114,7 +114,10 @@
114114
with haskell.lib; {
115115
# Patches don't apply
116116
github = overrideCabal hsuper.github (drv: { patches = []; });
117-
hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {};
117+
# Tests are broken on 9.2 and 9.4, and we wind up bypassing the
118+
# nixpkgs fixes to the test suite by doing this override. So just
119+
# turn it off.
120+
hiedb = haskell.lib.dontCheck (hsuper.callCabal2nix "hiedb" inputs.hiedb {});
118121

119122
# https://github.com/NixOS/nixpkgs/issues/140774
120123
ormolu =
@@ -135,21 +138,28 @@
135138
builtins.mapAttrs (_: haskell.lib.dontCheck)
136139
(overlay hself hsuper);
137140

138-
extended = hpkgs: hpkgs.override (old: {
141+
applyHaskellOverlays = overlays: hpkgs: hpkgs.override (old: {
139142
overrides =
140143
lib.fold
141144
lib.composeExtensions
142145
(old.overrides or (_: _: { }))
143-
[ haskellOverrides
144-
(dontCheck (haskell.lib.packageSourceOverrides hlsSources))
145-
tweaks
146-
];
146+
overlays;
147147
});
148+
149+
extended = forHlsCI:
150+
applyHaskellOverlays
151+
(prev.lib.optional forHlsCI haskellOverrides
152+
++ [ (dontCheck (haskell.lib.packageSourceOverrides hlsSources))
153+
tweaks
154+
]
155+
);
148156
in {
149157
inherit hlsSources;
150158

151159
# Haskell packages extended with our packages
152-
hlsHpkgs = compiler: extended haskell.packages.${compiler};
160+
hlsHpkgs = compiler: extended true haskell.packages.${compiler};
161+
# Haskell packages extended with our packages; reusing the nixpkgs set as much as possible
162+
hlsHpkgsNixpkgs = compiler: extended false haskell.packages.${compiler};
153163

154164
# Support of GenChangelogs.hs
155165
gen-hls-changelogs = hpkgs:

0 commit comments

Comments
 (0)