about summary refs log tree commit diff
path: root/src/nix-env/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-01-21T16·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-01-21T16·41+0000
commit840551ebdb6ca09ab733081dd0e92daee73ba900 (patch)
treec32d739343303455265d086a9cb7841d80878f88 /src/nix-env/main.cc
parent1109ea068097d4c5e3a4dfdeececf4590c52329a (diff)
* Extra bit `S' in `--query --status' output: show whether there are
  any substitutes for the derivation.

Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r--src/nix-env/main.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index eaa11fe259b1..a2e9b119aeff 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -606,10 +606,12 @@ static void opQuery(Globals & globals,
                 installedPaths.insert(i->second.outPath);
             
             for (DrvInfos::iterator i = drvs.begin(); i != drvs.end(); ++i) {
-                cout << format("%1%%2% %3%\n")
+                Paths subs = querySubstitutes(i->second.drvPath);
+                cout << format("%1%%2%%3% %4%\n")
                     % (installedPaths.find(i->second.outPath)
                         != installedPaths.end() ? 'I' : '-')
                     % (isValidPath(i->second.outPath) ? 'P' : '-')
+                    % (subs.size() > 0 ? 'S' : '-')
                     % i->second.name;
             }
             break;