mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +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:
|
packagesWith = cond: pkgs:
|
||||||
let
|
let
|
||||||
packagesWithInner = attrs:
|
packagesWithInner = attrs:
|
||||||
lib.unique (
|
lib.concatLists (
|
||||||
lib.concatLists (
|
lib.mapAttrsToList (name: elem:
|
||||||
lib.mapAttrsToList (name: elem:
|
let
|
||||||
let
|
result = builtins.tryEval elem;
|
||||||
result = builtins.tryEval elem;
|
in
|
||||||
in
|
if result.success then
|
||||||
if result.success then
|
let
|
||||||
let
|
value = result.value;
|
||||||
value = result.value;
|
in
|
||||||
in
|
if lib.isDerivation value then
|
||||||
if lib.isDerivation value then
|
lib.optional (cond value) value
|
||||||
lib.optional (cond value) value
|
else
|
||||||
else
|
if lib.isAttrs value && (value.recurseForDerivations or false || value.recurseForRelease or false) then
|
||||||
if lib.isAttrs value && (value.recurseForDerivations or false || value.recurseForRelease or false) then
|
packagesWithInner value
|
||||||
packagesWithInner value
|
else []
|
||||||
else []
|
else []) attrs);
|
||||||
else []) attrs));
|
|
||||||
in
|
in
|
||||||
packagesWithInner pkgs;
|
packagesWithInner pkgs;
|
||||||
|
|
||||||
packages =
|
packages = lib.unique
|
||||||
packagesWith (pkgs: pkgs ? fetch-deps) pkgs;
|
(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 = ''
|
helpText = ''
|
||||||
Please run:
|
Please run:
|
||||||
|
Loading…
Reference in New Issue
Block a user