Skip to content
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

Installation works in fish shell, but then it's not usable #3980

Open
Jiehong opened this issue Sep 1, 2020 · 14 comments
Open

Installation works in fish shell, but then it's not usable #3980

Jiehong opened this issue Sep 1, 2020 · 14 comments

Comments

@Jiehong
Copy link

Jiehong commented Sep 1, 2020

Hi,

Installing nix from a fish shell (Archlinux), seems to work at first, but nix is then not usable.

Steps To Reproduce

  1. Start an OS and use a fish shell (in my case: Archlinux)
  2. Install nix with the official installation process: curl -L https://nixos.org/nix/install | sh
  3. This will work and show the following message:
installing 'nix-2.3.7'
unpacking channels...

Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type

  . /home/vagrant/.nix-profile/etc/profile.d/nix.sh

in your shell.
  1. Running . /home/vagrant/.nix-profile/etc/profile.d/nix.sh reveals it's not working, because fish is not sh. The following error message is given:
~/.nix-profile/etc/profile.d/nix.sh (line 6): Unsupported use of '='. In fish, please use 'set NIX_LINK $HOME/.nix-profile'.
from sourcing file ~/.nix-profile/etc/profile.d/nix.sh
        called on line 185 of file /usr/share/fish/config.fish
in function '.' with arguments '/home/user/.nix-profile/etc/profile.d/nix.sh'
source: Error while reading file “/home/user/.nix-profile/etc/profile.d/nix.sh”

Expected behaviour

The installation process should detect the default shell, and/or provide a profile for other shells (aka nix.fish inside /home/user/.nix-profile/etc/profile.d/)

@stale
Copy link

stale bot commented Mar 5, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Mar 5, 2021
@domenkozar domenkozar removed the stale label Mar 15, 2021
@domenkozar
Copy link
Member

Reported in digitallyinduced/ihp#819

@Kineolyan
Copy link

Hello, I just wrote a translation that seems to work for fish. Do you want me to open a PR with this?

@domenkozar
Copy link
Member

Yup.

@Kineolyan
Copy link

Hello everyone, I submitted PR #4689 for this topic. The code has been approved so far, but I was lacking experience on nix build system to properly write tests. If you want to chime in with your expertise, that would be great. Otherwise, I let the good people from nix project decide what to do with the PR.

@stale
Copy link

stale bot commented Oct 22, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Oct 22, 2021
@danielb2
Copy link

I'd like to be able to use nix with fish. how's this coming ?

@stale stale bot removed the stale label Jan 27, 2022
@samlaf
Copy link

samlaf commented Mar 12, 2022

Same here. Would be nice to support fish.

@danielb2
Copy link

There really isn't much to initialize to make it usable in fish, so I don't see why this ticket is open so long.

to boot, @Jiehong has already provided the code. C'mon nix people ...

@jordigarcl
Copy link

I followed the installation tutorial and expected Nix to support fish since set up seemingly completed succesfully. It would be great to have this.

@Kineolyan
Copy link

My PR here is still working #4689
I have been using it for more than a year and I am still using it.
However, as mentioned in the final comments, I did not know what to do to add a test, and no one was suggesting solutions nor accepting to merge 🤷
Feel free to copy-paste the additional file 😄

@danielb2
Copy link

danielb2 commented Jun 5, 2022

My PR here is still working #4689 I have been using it for more than a year and I am still using it. However, as mentioned in the final comments, I did not know what to do to add a test, and no one was suggesting solutions nor accepting to merge 🤷 Feel free to copy-paste the additional file 😄

this is the one I use. Did you address their feedback there about the line at the end? Doesn't look like it

@Kineolyan
Copy link

Looking again at @Jiehong PR, there is this comment:

See #440. The main problem with adding fish support is that it will quickly get out of sync with the bash profile script, since the maintainers (e.g. me) don't use fish.

So it is likely that there will actually be no fish support. Not dsicussing with any maintainer, I cannot say how hard it is to maintain such integration.
Anyway, at the moment, I updated my PR, just in case.

@charego
Copy link

charego commented Nov 11, 2022

Close this as well? #7014 has been merged.

@stale stale bot added the stale label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants