Skip to content

Commit 62938f1

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/nixpkgs-update
2 parents 120baa6 + bed0a2d commit 62938f1

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

flake.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/install-plan/redirect.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let
1818
else existing.${(builtins.head available).id}.components.${collectionName}.${name};
1919
componentsWithPrefix = collectionName: prefix:
2020
lib.listToAttrs (lib.concatLists (lib.mapAttrsToList (n: available:
21-
lib.optional (lib.hasPrefix "${prefix}:" n && (builtins.length available != 1 || !builtins.elem (builtins.head available) ["TargetNotBuildable" "TargetNotLocal"])) (
21+
lib.optional (lib.hasPrefix "${prefix}:" n && (builtins.length available != 1 || !builtins.elem (builtins.head available) ["TargetNotLocal"])) (
2222
let
2323
name = lib.removePrefix "${prefix}:" n;
2424
value = lookupComponent collectionName name available;
@@ -45,6 +45,9 @@ let
4545
(_: d: pkgs.haskell-nix.haskellLib.check d)
4646
(lib.filterAttrs (_: d: d.config.doCheck) components.tests)));
4747
};
48+
buildableTargets = lib.filter (x: x.available != []) (
49+
lib.map (x: x // { available = lib.filter (n: n != "TargetNotBuildable") x.available; })
50+
config.plan-json.targets);
4851
in {
4952
options.hsPkgs = lib.mkOption {
5053
type = lib.types.unspecified;
@@ -63,10 +66,10 @@ in {
6366
components = err;
6467
checks = err;
6568
}
66-
else redirect existing packageName packageTargets) (builtins.groupBy (x: x.pkg-name) config.plan-json.targets)) config.preExistingPkgs
69+
else redirect existing packageName packageTargets) (builtins.groupBy (x: x.pkg-name) buildableTargets)) config.preExistingPkgs
6770

6871
# Redirect for `${name}-${version}`
6972
// builtins.mapAttrs (packageNameAndVersion: packageTargets: redirect existing packageNameAndVersion packageTargets)
70-
(builtins.groupBy (x: "${x.pkg-name}-${x.pkg-version}") config.plan-json.targets);
73+
(builtins.groupBy (x: "${x.pkg-name}-${x.pkg-version}") buildableTargets);
7174
};
7275
}

0 commit comments

Comments
 (0)