1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 13:31:48 +02:00

* `nix-env -qa --description' shows human-readable descriptions of

packages (provided that they have a `meta.description' attribute).
  E.g.,

  $ ./src/nix-env/nix-env -qa --description gcc
  gcc-4.0.2   GNU Compiler Collection, 4.0.x (cross-compiler for sparc-linux)
  gcc-4.0.2   GNU Compiler Collection, 4.0.x (cross-compiler for mips-linux)
  gcc-4.0.2   GNU Compiler Collection, 4.0.x (cross-compiler for arm-linux)
  gcc-4.0.2   GNU Compiler Collection, 4.0.x
This commit is contained in:
Eelco Dolstra 2006-03-10 16:20:42 +00:00
parent a33fb2d287
commit 37d1b1cafd
7 changed files with 79 additions and 25 deletions

View file

@ -7,6 +7,9 @@
#include "eval.hh"
typedef map<string, string> MetaInfo;
struct DrvInfo
{
private:
@ -19,24 +22,9 @@ public:
ATermMap attrs;
string queryDrvPath(EvalState & state) const
{
if (drvPath == "") {
Expr a = attrs.get("drvPath");
(string &) drvPath = a ? evalPath(state, a) : "";
}
return drvPath;
}
string queryOutPath(EvalState & state) const
{
if (outPath == "") {
Expr a = attrs.get("outPath");
if (!a) throw Error("output path missing");
(string &) outPath = evalPath(state, a);
}
return outPath;
}
string queryDrvPath(EvalState & state) const;
string queryOutPath(EvalState & state) const;
MetaInfo queryMetaInfo(EvalState & state) const;
void setDrvPath(const string & s)
{