-
Index the tree for references. If
.gitexists, usels-treeequivalent -
Check the validity of the
pkgs/unitdirectory, https://github.com/nixpkgs-architecture/rfcs/blob/master/rfcs/0140-simple-package-paths.md#detailed-design- Structure: Check not needed, we can check that in Nix
- Only derivations
- Stable boundary: Shouldn't reference files outside, neither be referenced from outside
- Custom arguments:
all-packages.nixcan reference unit directories in a limited way
-
Loop through all definitions in all-packages.nix
- If the definition could be migrated:
- If
--mode=migrate, migrate the code, output a message - If
--mode=warn, output a warning message only- If in GitHub Actions, create a code annotation
- If
--mode=error, output an error message, fail at the end- If in GitHub Actions, create a code annotation
- If
- If the definition could be migrated:
Perhaps create code annotations only when they're in a file that's changed by the PR