wiki/docs/nix.md

32 lines
745 B
Markdown

# Nix(OS)
## List dependencies of package
nix-store -q --references `which bash`
Instead of <code>\`which bash\`</code> you can also specify a file in a
nix store path (or just the store path) or a link to contents of the store.
### Reverse dependencies
nix-store -q --referrers `which bash`
Analogue to `apt-cache rdepends`. Like with `--references`, any nix store
reference can be passed.
### Recursive dependencies
nix-store -qR `which man`
In tree view:
nix-store -q --tree `which man`
## List all system generations
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
## Build package outside of nixpkgs tree
nix-build -E 'with import <nixpkgs> { }; callPackage ./mypackage.nix { }'