fish no longer installs share/fish/tools/ and instead embeds the
script in the binary. Extract it via `status get-file` and replace
the patch that stripped the autogenerated header with an inline sed
plus a test that fails the build if the upstream header format
changes.
`config.system.build.manual` being present requires both
`config.documentation.enable` and `config.documentation.nixos.enable` to
be true, so this check needs to match that.
__fish_datadir was renamed to __fish_data_dir in fish 3.0b1, see the
release notes in fish-doc(1):
> fish 3.0b1 (released December 11, 2018)
> ...
> Notable non-backward compatible changes
> ...
> • The internal variables __fish_datadir and __fish_sysconfdir are
> now known as __fish_data_dir and __fish_sysconf_dir respectively.
That this has kept working (?) all the while might possibly be an
indication that this could have been removed a little over seven years
ago.
With the release of fish 4.2.0 the contest of __fish_data_dir is also
no longer used (with the exception of HTML docs, and vendor_*.d), as
the standalone build mode is now enabled by default. Fish refers to
embedded files by prefixing them with "embedded:", see `$ type cd`:
`# Defined in embedded:functions/cd.fish @ line 5`.
This can be a fairly large bottleneck on slower systems, and as there
obviously are no useful shell completions generated from this man page
it can safely be ignored.
Babelfish translates `source script.sh` to `argv0 < script.sh | source`,
which is impure, and breaks when babelfish isn't in `systemPackages`.
To fix this, exec babelfish with argv0 set to babelfish from the final
system.
Wrapping programs is commonly done using `symlinkJoin`, which symlinks the man pages to the derivation that is actually installed. `-type f` by itself simply ignores such symlinks.
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
these changes were generated with nixq 0.0.2, by running
nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix
two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.
Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
environment.systemPackages can include any package, which means it can
be a top-level store path that is not a derivation and thus will not
have a name attribute - their name is extracted from the path instead.
Building etc."fish/setEnvironment.fish" needs
config.system.build.setEnvironment, which can be very large. And what
babelfishTranslate does is to translate env vars exported by bash
syntax, which does not need much computing power.
This patch can reduce the network traffic when using remote builders
with almost no harm.