Skip to content

Commit 1b37569

Browse files
committed
Jailbreak only broken packages
1 parent 6bf70dd commit 1b37569

File tree

2 files changed

+18
-36
lines changed

2 files changed

+18
-36
lines changed

nix/default.nix

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,19 @@ let
44
overlay = _self: pkgs:
55
let
66
sharedOverrides = {
7-
overrides = with pkgs.haskell.lib;
8-
_self: super: {
9-
svg-builder = doJailbreak super.svg-builder;
10-
statestack = doJailbreak super.statestack;
11-
active = doJailbreak super.active;
12-
monoid-extras = doJailbreak super.monoid-extras;
13-
size-based = doJailbreak super.size-based;
14-
force-layout = doJailbreak super.force-layout;
15-
dual-tree = doJailbreak super.dual-tree;
16-
diagrams-core = doJailbreak super.diagrams-core;
17-
diagrams-lib = doJailbreak super.diagrams-lib;
18-
# https://github.com/wz1000/HieDb/pull/27
19-
hiedb = dontCheck super.hiedb;
20-
diagrams-postscript = doJailbreak super.diagrams-postscript;
21-
diagrams-svg = doJailbreak super.diagrams-svg;
22-
diagrams-contrib = doJailbreak super.diagrams-contrib;
23-
};
7+
overrides = _self: super: {
8+
mkDerivation = args:
9+
let
10+
imBroken = with builtins;
11+
if hasAttr args.pname super then
12+
super.${args.pname}.meta.broken
13+
else
14+
false;
15+
in super.mkDerivation (args // { jailbreak = imBroken; });
16+
hiedb = pkgs.haskell.lib.dontCheck super.hiedb;
17+
};
2418
};
25-
gitignoreSource = (import sources.gitignore { inherit (pkgs) lib; }).gitignoreSource;
26-
extended = haskellPackages:
27-
haskellPackages.extend (pkgs.haskell.lib.packageSourceOverrides {
19+
ourSources = {
2820
haskell-language-server = gitignoreSource ../.;
2921
ghcide = gitignoreSource ../ghcide;
3022
shake-bench = gitignoreSource ../shake-bench;
@@ -39,10 +31,14 @@ let
3931
hls-retrie-plugin = gitignoreSource ../plugins/hls-retrie-plugin;
4032
hls-splice-plugin = gitignoreSource ../plugins/hls-splice-plugin;
4133
hls-tactics-plugin = gitignoreSource ../plugins/hls-tactics-plugin;
42-
});
34+
};
35+
gitignoreSource = (import sources.gitignore { inherit (pkgs) lib; }).gitignoreSource;
36+
extended = haskellPackages:
37+
haskellPackages.extend (pkgs.haskell.lib.packageSourceOverrides ourSources);
4338
in
4439
{
4540
inherit gitignoreSource;
41+
inherit ourSources;
4642
ourHaskell = pkgs.haskell // {
4743
packages = pkgs.haskell.packages // {
4844
# relax upper bounds on ghc 8.10.x versions (and skip running tests)

shell.nix

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,7 @@ let defaultCompiler = "ghc" + lib.replaceStrings ["."] [""] haskellPackages.ghc.
2424
then ourHaskell.packages.${defaultCompiler}
2525
else ourHaskell.packages.${compiler};
2626

27-
packages = p: [ p.haskell-language-server
28-
p.ghcide
29-
p.shake-bench
30-
p.hie-compat
31-
p.hls-plugin-api
32-
p.hls-brittany-plugin
33-
p.hls-class-plugin
34-
p.hls-haddock-comments-plugin
35-
p.hls-eval-plugin
36-
p.hls-explicit-imports-plugin
37-
p.hls-hlint-plugin
38-
p.hls-retrie-plugin
39-
p.hls-splice-plugin
40-
p.hls-tactics-plugin
41-
];
27+
packages = p: with builtins; map (name: p.${name}) (attrNames ourSources);
4228

4329
isSupported = compiler == "default" || compiler == defaultCompiler;
4430
in

0 commit comments

Comments
 (0)