I have my own fork of nixpkgs to work on a few packages. So, I use:
export NIX_PATH=nixpkgs=${srcdir}/nixpkgs:nixos-config=/etc/nixos/configuration.nix
I have no problem rebuilding from that using: nixos-rebuild switch
Now, I'm trying to use nix-env -qaP
to get a list of available packages with their version, but instead of using my NIX_PATH
, it uses the channels from ~/.nix-channels
, which is the wrong thing, and that, even if I use nix-env -I $NIX_PATH -qaP
.
I tried to put file://${srcdir}/nixpkgs nixos
in my ~/.nix-channels
, but it wants a MANIFEST
file that is not present and that I don't know how to generate.
Using nix-env (Nix) 1.11.11
(I don't know how to get a version for nixos-rebuild
).
This is fixed in the new interface: https://github.com/NixOS/nix/issues/993
Maybe this will work for you:
nix-env -f ${srcdir}/nixpkgs -qaP
IIRC you can just do nix-env -qaP -f '<nixpkgs>'
Yes, that works! Thanks a lot.
Most helpful comment
IIRC you can just do
nix-env -qaP -f '<nixpkgs>'