← 返回命令列表

Linux command

nix-why-depends 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

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]

说明

nix why-depends shows why a package depends on another. Traces dependency paths. The tool debugs closures. Helps understand and reduce dependencies.

参数

--all
Show all dependency paths.
--help
Display help information.

FAQ

What is the nix-why-depends command used for?

nix why-depends shows why a package depends on another. Traces dependency paths. The tool debugs closures. Helps understand and reduce dependencies.

How do I run a basic nix-why-depends example?

Run `nix why-depends nixpkgs#[hello] nixpkgs#[glibc]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --all do in nix-why-depends?

Show all dependency paths.