wiki/docs/nix.md
Simon Bruder 7cc20db4db
All checks were successful
continuous-integration/drone/push Build is passing
Initial commit
2020-11-05 12:04:06 +01:00

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 { }'