Commit 3a7d2b8b authored by David McFarland's avatar David McFarland
Browse files

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.
parent be577a25
Loading
Loading
Loading
Loading
+21 −19
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ let
  packagesWith = cond: pkgs:
    let
      packagesWithInner = attrs:
        lib.unique (
        lib.concatLists (
          lib.mapAttrsToList (name: elem:
            let
@@ -33,12 +32,15 @@ let
                    if lib.isAttrs value && (value.recurseForDerivations or false || value.recurseForRelease or false) then
                      packagesWithInner value
                    else []
                else []) attrs));
              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: