nix-why-depends
shows why a package depends on another
TLDR
Show dependency path
$ nix why-depends nixpkgs#[hello] nixpkgs#[glibc]
Show all paths$ nix why-depends --all nixpkgs#[package] nixpkgs#[dep]
From derivation files$ nix why-depends [/nix/store/...package] [/nix/store/...dep]
SYNOPSIS
nix why-depends [options] package dependency
DESCRIPTION
nix why-depends shows why a package depends on another. Traces dependency paths.
The tool debugs closures. Helps understand and reduce dependencies.
PARAMETERS
PACKAGE
Package to analyze.DEPENDENCY
Dependency to find.--all
Show all dependency paths.--help
Display help information.
CAVEATS
Part of Nix CLI. Requires evaluation. Closure analysis.
HISTORY
nix why-depends is part of the new Nix CLI for debugging dependency relationships.
