aboutsummaryrefslogtreecommitdiff
path: root/src/nix/why-depends.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-09 20:33:53 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-21 13:32:28 +0100
commit19540744ad164c13803048d5e8883fe68f9d2d10 (patch)
tree857b8769af5d727a90ab16df0184fa5737f1f3fc /src/nix/why-depends.cc
parentc14ed3f8b2cbddb335227d2ff5188896e76b713f (diff)
Add 'nix why-depends' manpage
Diffstat (limited to 'src/nix/why-depends.cc')
-rw-r--r--src/nix/why-depends.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc
index 57b9a2208..297b638cc 100644
--- a/src/nix/why-depends.cc
+++ b/src/nix/why-depends.cc
@@ -50,22 +50,11 @@ struct CmdWhyDepends : SourceExprCommand
return "show why a package has another package in its closure";
}
- Examples examples() override
+ std::string doc() override
{
- return {
- Example{
- "To show one path through the dependency graph leading from Hello to Glibc:",
- "nix why-depends nixpkgs#hello nixpkgs#glibc"
- },
- Example{
- "To show all files and paths in the dependency graph leading from Thunderbird to libX11:",
- "nix why-depends --all nixpkgs#thunderbird nixpkgs#xorg.libX11"
- },
- Example{
- "To show why Glibc depends on itself:",
- "nix why-depends nixpkgs#glibc nixpkgs#glibc"
- },
- };
+ return
+ #include "why-depends.md"
+ ;
}
Category category() override { return catSecondary; }