NixOS – How to Search for Packages in a Specific Channel

nixnixos

nix-env -v -qaP '*' currently returns all the packages available from all my channels.

How can I specify to return packages from a specific channel for example unstable / 18.03?

Best Answer

nix-env -f "https://github.com/NixOS/nixpkgs-channels/archive/775fb69ed73e7cf6b7d3dd9853a60f40e8efc340.tar.gz" -qa '*'

I grabbed the commit from selecting the branch on github: https://github.com/NixOS/nixpkgs/tree/nixos-19.03

Related Question