When `__structuredAttrs` is enabled, the `remove-references-to` script
ends up being built with a shebang of `#!@shell@` (among other, Darwin-
specific, breakages), as `$shell` isn't defined.
A small interlude: the eagle-eyed stdenv knowers reading this may be
thinking to themselves, "Doesn't stdenv set `$shell` if it's not
defined?" This is true... *but* consider the state of this file before
this change: it had `shell` as an argument to `mkDerivation`, and
arguments to `mkDerivation` get defined as *Bash variables*. So, when
stdenv was checking to see if `$shell` was defined, it was looking at
the *Bash variable* and not the environment variable.
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 57b193d8dd
result/bin/apply-formatting $NIXPKGS_PATH
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
Nix counts any occurrence of a store path's *hash* as a reference, even
without a store directory prefix. The current version only kills
references of the form `/nix/store/<hash>-`, which can fail e.g. for
compressed files.
This was causing some regions to escape the fixupHook. As a concrete
example, pkgconf's signature on aarch64-darwin was not valid because
the library was not fixed up.
This allows for a less blanket approach than nuke-refs, targetting specific
references that we know we don't want rather than all references that we don't
know we want.