1858-11-17

Watching TV in nixland: nix channels

nixpkgs is essentially a monolithic git repo containing a directory tree of nix expressions. The unstable channel contains the latest set of packages. The citizens of nix are busy everyday modifying and extending the expressions in the nixpkgs so that you can check out and compile everything you want using nix from a patched version of cat to libcairo, or the entirety of ghc.

We can observe the status of the mainstream nixpkgs channels and some more details about the status of the builds.

When you are subscribed to the channel updates begin when changes are pushed to master/release XX.XX branches.

    nix-channel --update

You can add new channels via:

    nix-channel --add https://some.channel/url my-alias

The Nixpkgs/NixOS channels correspond with nixpkgs repository branches (or vice versa). So origin/nixos-17.03 contains the built/tested version of the derivations for 17.03.

You can always tell which version of nixpkgs you are linking to:

    nix-instantiate --eval --expr 'builtins.readFile <nixpkgs/.version>'

To join the fun you can clone the nixpkgs from github and start modifying expressions to your hearts content. You can then load an environment against your version of <nixpkgs>. This is a great way to start expanding and debugging the package sets and joining the community.

    nix-shell -I nixpkgs=~/my-local-clone-of-nixpkgs