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

Installer support for Nushell #9813

Open
Eternahl opened this issue Jan 19, 2024 · 4 comments · May be fixed by #10439
Open

Installer support for Nushell #9813

Eternahl opened this issue Jan 19, 2024 · 4 comments · May be fixed by #10439
Labels
feature Feature request or proposal

Comments

@Eternahl
Copy link

Is your feature request related to a problem? Please describe.
The installation process fails if run from a nu shell.
Nix environment initialization is not defined for nu as login shell.

Describe the solution you'd like
Make the installation work in the same way as for a fish shell.

Describe alternatives you've considered
Manually add environment variables for nushell.

Additional context
I've already added a few installation scripts to this fork

Nushell is becoming increasingly popular. I can work on this, but I need a little guidance.
How does the nix installation process work ?

@Eternahl Eternahl added the feature Feature request or proposal label Jan 19, 2024
@abathur
Copy link
Member

abathur commented Jan 19, 2024

Can you clarify how "the installation process fails"? Does it succeed, but just not set up any init for nushell, or is there an actual error during the install? If the latter, can you include a log?

Ideally in a details element, like:

<details><summary>install log</summary>

```
... paste here ...
```

</details>

@yusuphgammut
Copy link

yusuphgammut commented Jan 19, 2024

Great work @Eternahl ! I'm not using nushell as login shell, but I did set it up as the default shell in my Alacritty config. I was just thinking about creating the nushell version of nix-daemon.sh but I see that you've done just that.

It will add to the awesomeness of your work if you can add the completions for nushell that are stored in /nix/var/nix/profiles/default/share as well, and of course if you can finally make it work for nushell as a login shell and merge your fork.

@Eternahl
Copy link
Author

The context: nushell installed as a login shell

Running the nix installation command (sh <(curl -L https://nixos.org/nix/install) --daemon) directly from nushell produce an error, but that is not really the point of this issue since we can use a sh shell as an alternative.

The main problem is that nushell is not handled by the installation script, so nix commands are not sourced.

~> nix-shell
Error: nu::shell::external_command

  × External command failed
   ╭─[entry #1:1:1]
 1  nix-shell
   · ────┬────
   ·     ╰── executable was not found
   ╰────
  help: No such file or directory (os error 2)

@dougg0k
Copy link

dougg0k commented Mar 23, 2024

You might need to take a look at scripts/local.mk, It's being used by some package files like Makefile and package.nix. They execute those scripts nix-profile and nix-profile-daemon.


But then they output other sh files, which are read by other sh files, not sure, but they could need a nushell version also.


Makefile seem to work with nushell nushell/nushell#6243 (comment)

@Eternahl Eternahl linked a pull request Apr 9, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants