about summary refs log tree commit diff
path: root/src/nix/path-info.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-22T12·39+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-22T12·39+0200
commit456179018a669be5d041d07ced927ad72d3c15f0 (patch)
treed6caf693bf34616f5bdcf5b72866160d4dea3604 /src/nix/path-info.cc
parent95abf9c40266687b5525261bad964c6856a58f18 (diff)
Fold "nix query-path-sigs" into "nix path-info"
Diffstat (limited to 'src/nix/path-info.cc')
-rw-r--r--src/nix/path-info.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc
index d144ef082977..9347795f1cb9 100644
--- a/src/nix/path-info.cc
+++ b/src/nix/path-info.cc
@@ -12,11 +12,13 @@ struct CmdPathInfo : StorePathsCommand
 {
     bool showSize = false;
     bool showClosureSize = false;
+    bool showSigs = false;
 
     CmdPathInfo()
     {
         mkFlag('s', "size", "print size of the NAR dump of each path", &showSize);
         mkFlag('S', "closure-size", "print sum size of the NAR dumps of the closure of each path", &showClosureSize);
+        mkFlag(0, "sigs", "show signatures", &showSigs);
     }
 
     std::string name() override
@@ -68,6 +70,14 @@ struct CmdPathInfo : StorePathsCommand
                 std::cout << '\t' << std::setw(11) << totalSize;
             }
 
+            if (showSigs) {
+                std::cout << '\t';
+                Strings ss;
+                if (info->ultimate) ss.push_back("ultimate");
+                for (auto & sig : info->sigs) ss.push_back(sig);
+                std::cout << concatStringsSep(" ", ss);
+            }
+
             std::cout << std::endl;
         }
     }