-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Fish suport to the Nix installer #7014
Add Fish suport to the Nix installer #7014
Conversation
See also #4689. |
scripts/nix-profile-daemon.fish.in
Outdated
end | ||
|
||
set --export --prepend --path PATH "@localstatedir@/nix/profiles/default/bin" | ||
set --export --prepend --path PATH "$HOME/.nix-profile/bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query at the end of nix-profile.fish.in
applies to these two as well.
The main reason why we haven't merged fish support in the past is that it lacks tests, and without that, it's likely to bitrot. So as part of the installer testing, we need to make sure we test fish as well. |
BTW, we may want to consider the use of |
@edolstra I'll open up a ticket about Let me add a fish test. |
(Please pardon me, it seems to be a Github Actions driven test with no local equivalent, so I need to "test on ci") |
@Hoverbear You may have figured this out since it indicates that the installer test is expected, but just in case there's documentation on enabling the install tests in your fork in #6652. (I do wonder if it'll make performance sense to just collapse each shell-specific invocation into the same install-test run for speed, but that can wait for confirmation that the matrix approach is working right...) |
It seems to be ok: https://github.com/Hoverbear/nix/actions/runs/3039672534 It does seem like it would make performance sense. Let me fix that. |
I think all comments are addressed. If there is anything I'm missing please let me know and I can do it right away! |
Before this patch, installing Nix using the Fish shell did not work because Fish wasn't configured to add Nix to the PATH. Some options in NixOS#1512 offered workarounds, but they typically involve extra plugins or packages. This patch adds native, out-of-the-box support for the Fish shell. Note that Fish supports a `conf.d` directory, which is intended for exactly use cases like this: software projects distributing shell snippets. This patch takes advantage of it. The installer doesn't append any Nix loader behavior to any Fish config file. Because of that, the uninstall process is smooth and a reinstall obliterates the existing nix.fish files that we place instead of bothering the user with a backup / manual removal. Both single-user and multi-user cases are covered. It has been tested on Ubuntu, and a Mac with MacPorts, homebrew, and the Fish installer pkg. Closes NixOS#1512 Co-authored-by: Graham Christensen <graham@grahamc.com>
Signed-off-by: Ana Hobden <operator@hoverbear.org>
c240c3d
to
7194c87
Compare
Git push to origin failed for 2.11-maintenance with exitcode 1 |
This was resolved in NixOS/nix#7014
…ish-support-for-the-nix-installer Add Fish suport to the Nix installer
Before this patch, installing Nix using the Fish shell did not work because Fish wasn't configured to add Nix to the PATH. Some options in #1512 offered workarounds, but they typically involve extra plugins or packages.
This patch adds native, out-of-the-box support for the Fish shell.
Note that Fish supports a
conf.d
directory, which is intended for exactly use cases like this: software projects distributing shell snippets. This patch takes advantage of it. The installer doesn't append any Nix loader behavior to any Fish config file. Because of that, the uninstall process is smooth and a reinstall obliterates the existing nix.fish files that we place instead of bothering the user with a backup / manual removal.Both single-user and multi-user cases are covered. It has been tested on Ubuntu, and a Mac with MacPorts, homebrew, and the Fish installer pkg.
Written in collaboration with @Hoverbear at DetSys.
Closes #1512