Some question about nix-channel git commit version and packages

#1
  1. Is there any benefit using nix-channel than git clone [nixpkgs-unstable github repository](https://github.com/NixOS/nixpkgs-channels)?
    -> well, i think if cloning, i can’t use cache.nixos.org… and can’t find nix expression like <nixpkgs>… and anything else?

  2. when i nix-env -u <package>, for instance, openjdk8u is upgraded to openjdk11 not latest cache’s openjdk8u. how can i upgrade package to latest cache’s pre-built binary?

0 Likes

#2

If you are using NixOS, nix channels are, I think, the driver of interactions like this,

$ lsof
The program ‘lsof’ is currently not installed. It is provided by
several packages. You can install it by typing one of the following:
  nix-env -iA nixos.busybox
  nix-env -iA nixos.lsof

That is, a missing executable is tied to a package name (which I typically pull in with nix-shell, rather than nix-env). I find this quite handy, so even though my NIX_PATH points to a normal git clone, I still have a channel set up just for this feature.

1 Like