Cheatsheet: Difference between revisions

imported>InLaw
m add Comparison_of_secret_managing_schemes
imported>Mkohler
Simplify command for showing the package dependencies of the system
Line 126: Line 126:
|List package dependencies
|List package dependencies
|<syntaxhighlight lang="console">$ apt-cache depends emacs</syntaxhighlight>
|<syntaxhighlight lang="console">$ apt-cache depends emacs</syntaxhighlight>
|<syntaxhighlight lang="console">$ nix-store --query --requisites $(readlink -f /run/current-system)
|Show the immediate dependencies:
nix-store -q --tree /nix/var/nix/profiles/system</syntaxhighlight>
<syntaxhighlight lang="console">$ nix-store --query --requisites /run/current-system</syntaxhighlight>
or show a nested ASCII tree of dependencies:
<syntaxhighlight lang="console">$ nix-store -q --tree /nix/var/nix/profiles/system</syntaxhighlight>
(/run/current-system and /nix/var/nix/profiles/system are symbolic links that eventually end up at the same place.)
|<syntaxhighlight lang="console">$ nix-store --query --references\
|<syntaxhighlight lang="console">$ nix-store --query --references\
   $(nix-instantiate '<nixpkgs>' -A emacs)</syntaxhighlight>
   $(nix-instantiate '<nixpkgs>' -A emacs)</syntaxhighlight>