We encountered a fish build failure [1] caused by the store path for
gnugrep coincidentally containing the string `awk`. A later substitution
of `awk` replaced this substring with another store path in some files,
resulting in a number of broken paths.
Extending the `awk` pattern to `awk ` solves this problem and should be
relatively safe given that awk requires arguments to be passed.
[1] https://hydra.nixos.org/build/343861659
__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`.
https://github.com/fish-shell/fish-shell/releases/tag/4.6.0
Upstream refactored tests in this release, removing many hardcoded FHS
paths, so most substituteInPlace calls are no longer needed. The
highlight test now uses /usr/bin/env instead of /bin/cat.
Add the new resettable_style_attribute SGR test to skip-sgr-tests.patch
since it fails in the sandbox like the other SGR tests.
This commit adds `python3Packages.sphinx` to the build inputs for `fish`, as
that package is used to generate the man / help pages for fish builtins.
Before this, the fish build did not actually build documentation, since the
`sphinx` package is a required dependency for that.
There's been a bit of a back and forth about man-page building in the fish repo,
so I don't really follow why it's broken for Nix builds. From what I can tell,
there's been some changes to Sphinx in 4.2.0 that prompted a (temporary) fix in
4.2.1 fix (fish-shell/fish-shell@b9af3eca9f73297e0faab88c7587a08ac0ced64cto) to
add them back to the release tarball, before being completely removed in 4.3.0
(fish-shell/fish-shell#12088). The temporary fix in 4.2.1 might not actually fix
the problem fully (?) since the Nix release of 4.2.1 is broken as well.
I haven't tested 4.2.0 to see check whether that has man pages.
Either way, `fish` *needs* `sphinx` to generate the documentation, and we only
add it to the `nativeCheckInputs`, not the `nativeBuildInputs`.
I was able to fix this in my flake
(tommyknows/nixfiles@3896633989) by adding an
overlay that adds `python3Packages.sphinx` to the `nativeBuildInputs`.
So this commit implements the same fix by moving `sphinx` from a
`nativeCheckInput` to a `nativeBuildInput`.
Fish no longer sources most files in `$out/share/fish` with 4.2.0, and
instead embeds these files in the fish binary itself:
> The standalone build mode has been made the default. This means that
> the files in $CMAKE_INSTALL_PREFIX/share/fish will not be used
> anymore, except for HTML docs. As a result, future upgrades will no
> longer break running shells if one of fish’s internal helper functions
> has been changed in the updated version. For now, the data files are
> still installed redundantly, to prevent upgrades from breaking
> already-running shells. To reverse this change (which should not be
> necessary), patch out the embed-data feature from cmake/Rust.cmake.
> This option will be removed in future.
This means that any changes to these files now have to be made the input
before the build system tries to embed them.
its rust cmake module is not able to accurately determine the target
architecture for the rust compiler. This results in the rust part being
built for the build platform.