+++ date = "2023-05-05T23:07:51+00:00" lastmod = "2023-05-05T23:07:51+00:00" tags = [ "linux", "gists" ] author = "tdro" +++ Different words similar meaning? [`--references`](https://nixos.org/manual/nix/stable/command-ref/nix-store/query.html#queries) is [NixOS](https://nixos.org/) speak for direct [package dependencies](https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#depends). `--requisites` list all. These work with the [`nix-store`](https://nixos.org/manual/nix/stable/command-ref/nix-store.html) command. ```shell $ readlink --canonicalize "$(type -P which)" /nix/store/r78jv9xgxnvsm5vpasf5ldkc28pkri6r-which-2.21/bin/which $ nix-store --query --references /nix/store/r78jv9xgxnvsm5vpasf5ldkc28pkri6r-which-2.21 /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163 ``` [`which`](https://man.archlinux.org/man/which.1) directly depends on [`glibc`](https://man.archlinux.org/man/glibc.7). Swap `--references` to `--referrers` for paths pointing to `which`. On [Guix](https://guix.gnu.org/), list/draw dependencies with [`guix graph`](https://guix.gnu.org/manual/en/html_node/Invoking-guix-graph.html). ```shell guix graph --type=references which ```