Skip to content

Commit c69b53f

Browse files
committed
Fix handling of buildable: False
1 parent 278df11 commit c69b53f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

overlays/haskell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ final: prev: {
835835
else config.hsPkgs.${(builtins.head available).id}.components.${collectionName}.${name};
836836
componentsWithPrefix = collectionName: prefix:
837837
final.lib.listToAttrs (final.lib.concatLists (final.lib.mapAttrsToList (n: available:
838-
final.lib.optional (final.lib.hasPrefix "${prefix}:" n) (
838+
final.lib.optional (final.lib.hasPrefix "${prefix}:" n && (builtins.length available != 1 || builtins.head available != "TargetNotBuildable")) (
839839
let
840840
name = final.lib.removePrefix "${prefix}:" n;
841841
value = lookupComponent collectionName name available;

test/buildable/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ let
66
project = cabalProject' {
77
inherit compiler-nix-name evalPackages;
88
src = testSrc "buildable";
9-
modules = [ { packages.buildable-test.flags.exclude-broken = true; } ];
9+
cabalProjectLocal = ''
10+
package buildable-test
11+
flags: +exclude-broken
12+
'';
1013
};
1114
packages = project.hsPkgs;
1215

0 commit comments

Comments
 (0)