Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created April 3, 2018 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/55a9d8433a80476a6f453176679944aa to your computer and use it in GitHub Desktop.
Save grahamc/55a9d8433a80476a6f453176679944aa to your computer and use it in GitHub Desktop.
$ nix-channel --list
nixos https://nixos.org/channels/nixpkgs-unstable
nixpkgs https://nixos.org/channels/nixpkgs-unstable
nixpkgsunstable https://nixos.org/channels/nixpkgs-unstable
$ nix build -f /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs git
$ ls -la result
lrwxrwxrwx 1 grahamc users 54 Apr 3 08:31 result -> /nix/store/g1jqxcqiswca72yr8mcj8lbd0w9fz6zh-git-2.16.2
$ rm result
$ nix build nixpkgs.git
$ ls -la result
lrwxrwxrwx 1 grahamc users 54 Apr 3 08:32 result -> /nix/store/jaani1kx4a4kvz11d0myfkjjiiklfl7w-git-2.16.2
$ rm result
$ nix build -f '<nixpkgsunstable>' git
$ ls -la result
lrwxrwxrwx 1 grahamc users 54 Apr 3 08:32 result -> /nix/store/jaani1kx4a4kvz11d0myfkjjiiklfl7w-git-2.16.2
$ NIX_PATH=/home/grahamc/.nix-defexpr/channels nix build nixpkgs.git
error: attribute 'nixpkgs' in selection path 'nixpkgs.git' not found
$ NIX_PATH=/home/grahamc/.nix-defexpr/channels nix build -f '<nixpkgs>' git
$ ls -la result
lrwxrwxrwx 1 grahamc users 54 Apr 3 08:32 result -> /nix/store/jaani1kx4a4kvz11d0myfkjjiiklfl7w-git-2.16.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment