nix-shell -p <some_pkg> not working with fish-shell #1131

Open
opened 2026-02-11 12:10:38 +00:00 by ddogfoodd · 2 comments

Describe the bug

nix-shell -p <some_pkg> doesn't work for my fish shell.
The installed package is not available and the prompt doesn't indicate that the nix-shell is active.

nix shell nixpkgs#<some_pkg> works as expected.

I have tried with Lix from nixpkgs stable, latest and git using the "Advanced change" described here: https://lix.systems/add-to-config/

Works on vanilla nix.

Steps To Reproduce

  1. Use Lix stable, latest or git
  2. Enable fish-shell
  3. Try nix-shell -p <some_pkg>
  4. Package is not available and there is no indicator for the active nix-shell

Expected behavior

I expected an indicator for the active nix-shell to appear and the package to be available. Like with nix shell or vanilla nix.

nix --version output

Stable

nix (Lix, like Nix) 2.94.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/azm88nn29hmfnrrmh1rv0wp32a7kvwmd-lix-2.94.0/share

Latest

nix (Lix, like Nix) 2.94.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/azm88nn29hmfnrrmh1rv0wp32a7kvwmd-lix-2.94.0/share

Git

nix (Lix, like Nix) 2.95.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/0rg35jcbwjcim8di5d97fqvxa3mzjcqp-lix-2.95.0-pre-20260103_d387c9113c73/share

Additional context

fish-shell 4.4.0

## Describe the bug `nix-shell -p <some_pkg>` doesn't work for my `fish` shell. The installed package is not available and the prompt doesn't indicate that the nix-shell is active. `nix shell nixpkgs#<some_pkg>` works as expected. I have tried with Lix from nixpkgs `stable`, `latest` and `git` using the "Advanced change" described here: https://lix.systems/add-to-config/ Works on vanilla nix. ## Steps To Reproduce 1. Use Lix `stable`, `latest` or `git` 2. Enable fish-shell 3. Try `nix-shell -p <some_pkg>` 4. Package is not available and there is no indicator for the active nix-shell ## Expected behavior I expected an indicator for the active nix-shell to appear and the package to be available. Like with `nix shell` or vanilla nix. ## `nix --version` output ### Stable ``` nix (Lix, like Nix) 2.94.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/azm88nn29hmfnrrmh1rv0wp32a7kvwmd-lix-2.94.0/share ``` ### Latest ``` nix (Lix, like Nix) 2.94.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/azm88nn29hmfnrrmh1rv0wp32a7kvwmd-lix-2.94.0/share ``` ### Git ``` nix (Lix, like Nix) 2.95.0 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/jost/.config/nix/nix.conf:/nix/store/1x3a3vy8y7ii61xbn871nlnnkpd57lsy-stylix-kde-config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jost/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jost/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jost/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/0rg35jcbwjcim8di5d97fqvxa3mzjcqp-lix-2.95.0-pre-20260103_d387c9113c73/share ``` ## Additional context fish-shell 4.4.0
Owner

Hi, thanks for the report. I believe we have a bunch of users who are running fish and are not reproducing your bug.
Could you provide nix-shell -vvvvv -p a_package ?

Hi, thanks for the report. I believe we have a bunch of users who are running fish and are not reproducing your bug. Could you provide `nix-shell -vvvvv -p a_package` ?
Author

@raito wrote in #1131 (comment):

Hi, thanks for the report. I believe we have a bunch of users who are running fish and are not reproducing your bug. Could you provide nix-shell -vvvvv -p a_package ?

Sure!

@raito wrote in https://git.lix.systems/lix-project/lix/issues/1131#issuecomment-17541: > Hi, thanks for the report. I believe we have a bunch of users who are running fish and are not reproducing your bug. Could you provide `nix-shell -vvvvv -p a_package` ? Sure!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1131
No description provided.