numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
247 stars 75 forks source link

Specify full path to formatters #100

Closed gkze closed 1 year ago

gkze commented 1 year ago

nix flake check results in a warning stating that usage of package names for commands is deprecated, and a full path to the executable must be specified. Add ${lib.getBin cfg.package}/bin/foo everywhere where only cfg.package is used to specify the command.

Example:

warning: getExe: Package "yamlfmt-0.9.0" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, specify the full path to the program, such as "${lib.getBin foo}/bin/bar".