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
This adds a warning to the top of each “boot” package that reads:
Note: this package is used for bootstrapping fetchurl, and thus cannot
use fetchpatch! All mutable patches (generated by GitHub or cgit) that
are needed here should be included directly in Nixpkgs as files.
This makes it clear to maintainer that they may need to treat this
package a little differently than others. Importantly, we can’t use
fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale
hashes, we need to include patches that are subject to changing
overtime (for instance, gitweb’s patches contain a version number at
the bottom).
Unfortunately the output of git.savannah.nongnu.org changes with each
gitweb update. This means that the current has
“0gja54fz79a9ma6b4mprnjxq77l5yg2z9xknlwhmkcrfnam02qxp” is no longer
correct:
$ nix-prefetch-url
https://git.savannah.nongnu.org/cgit/attr.git/patch/\?id=14adc898a36948267bfe5c63b399996879e94c98
1g8sky52rjg9fpmrddza1af89s9qd4bzsbxqb7mc5bv8gyh10s1k
Normally, we use fetchpatch to strip this out, but unfortunately attr
cannot use fetchpatch due to being used in bootstrapping fetchurl.
That is, it can’t use a custom postFetch since <nix/fetchurl.nix>
doesn’t support that.
To solve this problem, just inline the patch for now.
This involved fixing some buildInputs/buildNativeInputs in acl/attr,
and adding a libiconv in some places.
svn path=/nixpkgs/branches/stdenv-updates/; revision=20510
exists. There is a newer version on the server, but it cannot be
downloaded, apparently because of misconfigured permissions.
svn path=/nixpkgs/trunk/; revision=13995