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.)