Cherry-pick upstream commit to ensure that completions for commands
like mkfs.xfs(8) end up in mkfs.xfs.fish by fixing over-eager stripping
of file extensions.
All mkfs.*(8) (and fsck.*(8), etc.) programs would yield mkfs.fish files
with unique `complete -c mkfs ...` lines using the same command.
Thus completing `mkfs` in fish would for example yield XFS specific
suggestions, given "xfsprogs" was installed **and** won over other
packages.
Noticed through build logs:
```
building '/nix/store/5fz5jgkd2ycx5fk3lb30my2hr2br639f-system_fish-completions.drv'...
warning: collision between `/nix/store/1z01j2pma0l005w3qg6slndn0rp136s8-dosfstools-4.2_fish-completions/mkfs.fish' and `/nix/store/jxxgrng41l6qakg45fksk1qpil976vgi-xfsprogs-5.16.0_fish-completions/mkfs.fish'
```
The repository of the project has been transferred to a GitHub organisation.
See https://github.com/pure-fish/pure/issues/249.
The tests of this package are also failing upstream, so they have been
temporarily disabled here too.
Python is still used for tests, but does not become part of the closure.
In addition, nowadays fish only ever uses Python via __fish_anypython,
so using sed or propagating python isn't necessary anymore.
Replacing all occurrences of `/usr` with `/nix` doesn't work, because
one test is just verifying if `wdirname` works (and `dirname /usr/lib`
is not the same as `dirname /nix/lib`).
mkDerivation does not care about checkPlugins and checkFunctionDirs so let’s avoid polluting the scope.
Also remove installPath argument altogether for the same reason since it is not used at all.
This new option allows for replacing the sourcing of
/etc/fish/nixos-env-preinit.fish with another file, optionally passing
it through `fenv`. The idea here is that non-NixOS users can do
something like
fish.override {
fishEnvPreInit = sourceBash:
sourceBash "${nix}/etc/profile.d/nix-daemon.sh";
}
and this will set up their shell environment for Nix just as though they
were running NixOS.
This adds a wrapper for fish which allows creating shells pre-initialised
with some completions, functions, and configuration scripts from given paths
or from fish plugin packages (`pkgs.fishPlugins.*`).
This is especially handy when one wants to try a plugin in an ephemeral shell.
GitHub: see https://github.com/NixOS/nixpkgs/pull/107834#discussion_r550612519
`nix-build -A fish.tests.fishConfig` will now test that the
`fish_config` tool would start up properly. Previously, this test was
effectively disabled due to `withTests` being stubbed out.
I don't think this test ever truly worked, because the generated
temporary file would be cleaned up automatically (or maybe this
"automatically" changed between versions). The solution to this is to
add `delete=False` to the `NamedTemporaryFile` function call, to keep
the temporary file around in order to grep its contents for the expected
output.
https://github.com/fish-shell/fish-shell/compare/3.1.1...3.1.2
"This release of fish fixes a major issue discovered in fish 3.1.1:
Commands such as `fzf` and `enhancd`, when used with `eval`, would hang.
`eval` buffered output too aggressively, which has been fixed."
https://github.com/fish-shell/fish-shell/compare/3.1.0...3.1.1
The patch we had to use for Apple SDKs was merged upstream, so it can be
dropped. I ran nixpkgs-fmt, and removed the `with stdenv.lib;` scope
expander.
Additionally, did a little bit of cleanup. I plan on refactoring this
more down the line, but this'll do for now.
I finally figured out why we use `fetchurl` for the tagged release: the
published release tarballs contain a version file, which the
`build_tools/git_version_gen.sh` script reads (and uses as the version
if it exists). The other thing it contains are pre-generated docs for
various `fish` builtins. I've expanded the comment to document this so
nobody is as confused as I was when I first saw it. (Though I plan to
change this and add sphinx as a native build input in order to build the
docs ourselves.)
fish-shell 3.1.0 was just released today with many niceties (including
the ability to have bash-like temporary env vars e.g. `VAR="var1"
command` instead of needing to use `env VAR="var1" command`). To see the
full list of changes, please visit
https://github.com/fish-shell/fish-shell/releases/tag/3.1.0.
"`^` as a redirection deprecated and will be removed in the future."
(see the changelog, under the 3.0b1 release)
The latest fish beta release (3.1b1 as of time of writing) errors when
encountering `^&1` (though the fact it is now an error has yet to be
documented by them). The plugin was updated last year to account for
this change, and with the "imminent" release of fish-shell v3.1, this
should be fixed.
The expression claimed there are differences between the release tarball and the tarball github packages from the tag but fetchFromGitHub literally downloads the same tarball.
Fish 3.0 has an updated an more robust handling of unicode glyphs. Per
the original author of the INTERNAL_WCWIDTH flag, it was something of
misfeature, and they regret that NixOS came to rely on it.
Removes the flag from the Nix expression.
Flag was added originally to Nixpkgs in 68076b7d49
It is being removed entirely from upstream fish:
https://github.com/fish-shell/fish-shell/pull/5777.
This is important when typing characters such as ⚡(U+26A1 HIGH VOLTAGE
SIGN), otherwise fish computes a different character width than the
terminal. See https://github.com/fish-shell/fish-shell/pull/4816