Skip to content

Commit 6e321a7

Browse files
committed
Check whether the package is jailbroken, add comments
1 parent 51e2134 commit 6e321a7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nix/default.nix

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@ let
55
let
66
sharedOverrides = {
77
overrides = _self: super: {
8+
# we override mkDerivation here to apply the following
9+
# tweak to each haskell package:
10+
# if the package is broken, then we disable its check and relax the cabal bounds;
11+
# otherwise, we leave it unchanged.
12+
# hopefully, this could fix packages marked as broken by nix due to check failures
13+
# or the build failure because of tight cabal bounds
814
mkDerivation = args:
915
let
1016
broken = args.broken or false;
1117
check = args.doCheck or true;
12-
in super.mkDerivation (args // { jailbreak = broken; doCheck = if broken then false else check; });
18+
jailbreak = args.jailbreak or false;
19+
in super.mkDerivation (args // {
20+
jailbreak = if broken then true else jailbreak;
21+
doCheck = if broken then false else check;
22+
});
1323
};
1424
};
1525
ourSources = {

0 commit comments

Comments
 (0)