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

nix-env -qa returns zero packages #968

Closed
domenkozar opened this issue Jul 11, 2016 · 7 comments
Closed

nix-env -qa returns zero packages #968

domenkozar opened this issue Jul 11, 2016 · 7 comments
Labels

Comments

@domenkozar
Copy link
Member

domenkozar commented Jul 11, 2016

I'm having a weird issue with nix-env -qa not returning any packages using Nix 1.11.2

# echo $NIX_PATH
nixpkgs=http://nixos.org/channels/nixos-16.03/nixexprs.tar.xz

# nix-channel --update
unpacking channels...
downloading ‘http://nixos.org/channels/nixos-16.03/nixexprs.tar.xz’... [0/0 KiB, 0.0 KiB/s]
created 0 symlinks in user environment

# nix-env -qa

# nix-env -qa -f '<nixpkgs>'
.. works and displays the packages

# ls -la ~/.nix-defexpr/
total 8
drwxr-xr-x 2 root root 4096 Jul 11 10:14 .
drwx------ 8 root root 4096 May 24 12:12 ..
lrwxrwxrwx 1 root root   44 Jul 11 10:14 channels -> /nix/var/nix/profiles/per-user/root/channels

# ls -la /nix/var/nix/profiles/per-user/root/channels/
total 56208
dr-xr-xr-x 2 root root       4096 Jan  1  1970 .
drwxrwxr-t 1 root nixbld 57544704 Jul 11 10:14 ..
lrwxrwxrwx 2 root root         60 Jan  1  1970 manifest.nix -> /nix/store/w213fg5zb7df8h1wsldqpqi7yk9d80rk-env-manifest.nix

# ls /nix/store/w213fg5zb7df8h1wsldqpqi7yk9d80rk-env-manifest.nix
/nix/store/w213fg5zb7df8h1wsldqpqi7yk9d80rk-env-manifest.nix

# cat /nix/store/w213fg5zb7df8h1wsldqpqi7yk9d80rk-env-manifest.nix
[ ]

@domenkozar domenkozar added the bug label Jul 11, 2016
@domenkozar domenkozar changed the title nix-env -qa returns nothing nix-env -qa returns zero packages Jul 11, 2016
@domenkozar
Copy link
Member Author

Could it be related to rm /nix/var/nix/binary-cache-v3.sqlite?

@domenkozar
Copy link
Member Author

cc @edolstra for any quick ideas.

@edolstra
Copy link
Member

The created 0 symlinks in user environment suggests that there are no channels.

@domenkozar
Copy link
Member Author

domenkozar commented Jul 11, 2016

@edolstra there are no channels, but NIX_PATH=nixpkgs=http://nixos.org/channels/nixos-16.03/nixexprs.tar.xz should declare nix path regardless or am I misunderstanding?

So nix-env assumes a channel?

@edolstra
Copy link
Member

Yes, $NIX_PATH has no effect on where nix-env looks by default.

@domenkozar
Copy link
Member Author

domenkozar commented Jul 12, 2016

@edolstra

  • nix-env and others could support $NIX_PATH. I ship <nixpkgs> in another channel and I don't want to maintain two channels as that calls for trouble (just as we had nixpkgs and nixos channels). Would this be a reasonable feature?
  • nix-channel --update should have a more clear message what happens. 0 channels updated. in this case
  • nix-env -qa should print something in case it fails to find packages. Where it looked for packages and that they're not there.

@domenkozar
Copy link
Member Author

Opened #993 and updated #684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants