mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
update-dotnet-lockfiles: skip packages that don't evaluate
This allows the script to run on platforms that can't fetch all of the packages, or without allowing unfree.
This commit is contained in:
parent
be577a25f4
commit
3a7d2b8bbf
@ -17,28 +17,30 @@ let
|
||||
packagesWith = cond: pkgs:
|
||||
let
|
||||
packagesWithInner = attrs:
|
||||
lib.unique (
|
||||
lib.concatLists (
|
||||
lib.mapAttrsToList (name: elem:
|
||||
let
|
||||
result = builtins.tryEval elem;
|
||||
in
|
||||
if result.success then
|
||||
let
|
||||
value = result.value;
|
||||
in
|
||||
if lib.isDerivation value then
|
||||
lib.optional (cond value) value
|
||||
else
|
||||
if lib.isAttrs value && (value.recurseForDerivations or false || value.recurseForRelease or false) then
|
||||
packagesWithInner value
|
||||
else []
|
||||
else []) attrs));
|
||||
lib.concatLists (
|
||||
lib.mapAttrsToList (name: elem:
|
||||
let
|
||||
result = builtins.tryEval elem;
|
||||
in
|
||||
if result.success then
|
||||
let
|
||||
value = result.value;
|
||||
in
|
||||
if lib.isDerivation value then
|
||||
lib.optional (cond value) value
|
||||
else
|
||||
if lib.isAttrs value && (value.recurseForDerivations or false || value.recurseForRelease or false) then
|
||||
packagesWithInner value
|
||||
else []
|
||||
else []) attrs);
|
||||
in
|
||||
packagesWithInner pkgs;
|
||||
|
||||
packages =
|
||||
packagesWith (pkgs: pkgs ? fetch-deps) pkgs;
|
||||
packages = lib.unique
|
||||
(lib.filter (p:
|
||||
(builtins.tryEval p.outPath).success ||
|
||||
builtins.trace "warning: skipping ${p.name} because it failed to evaluate" false)
|
||||
(packagesWith (p: p ? fetch-deps) pkgs));
|
||||
|
||||
helpText = ''
|
||||
Please run:
|
||||
|
Loading…
Reference in New Issue
Block a user