Refactor nix packages by applying a modification, then iterating a fix until all errors are gone.
See the Haddock documentation in lib/NixpkgsErrorGuidedRefactor.hs
The executables take from standard input a list of filepath:attrpath to act on, one per line. Example input:
pkgs/by-name/he/hello/package.nix:hello
pkgs/by-name/cm/cmake/package.nix:cmake
They should be run at the root of a clean worktree, and will create a commit for every refactored package.
The tool performs a number of checks to ensure a robust migration:
meta
and passthru
).mkDerivation rec
with the finalAttrs
pattern.
Run finalAttrs-finder.sh
in the root of nixpkgs to
produce the input.
This refactor performs an additional check:
if pname
misuse
is detected, the package is skipped.