This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
The default (latest) version is now defined in 'generic.nix' and is the
same for the three packages.
'ocamlformat-rpc-lib' is no longer defined separately and also use the
latest version as a default.
This made ocamlformat always build with the default version of OCaml
independently from the specified version.
The library was incompatible with the other libraries when using a
version different from the default.
Move the definitions of OCamlformat packages into ocamlPackages. This
moves the package containing the tool closer to the definition of the
library.
It's now possible to build OCamlformat using a different version of
OCaml than the default.
`ocamlformat`, `ocamlPackages.ocamlformat` and
`ocaml-ng.ocamlPackages_<lastest>.ocamlformat` are all aliases.
The ocamlformat package have been split into two in version 0.25.1:
one for the library and one for the executable.
This adds both packages at the same time.
They have the same sources and very similar dependencies, for which the
definition is shared.