aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env/user-env.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-17 19:02:56 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-20 13:33:13 +0200
commit90825dea518ea078f0783a72cc471a5b3716d198 (patch)
treeb6f6fed6e8c7a96a6769344060409f19a56290b9 /src/nix-env/user-env.cc
parent3162ad5ff497b92fc25cd3f397eaff01d67340cc (diff)
Add "nix search" command
Diffstat (limited to 'src/nix-env/user-env.cc')
-rw-r--r--src/nix-env/user-env.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc
index e9997fae5..df5105f12 100644
--- a/src/nix-env/user-env.cc
+++ b/src/nix-env/user-env.cc
@@ -56,9 +56,10 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
state.mkAttrs(v, 16);
mkString(*state.allocAttr(v, state.sType), "derivation");
- mkString(*state.allocAttr(v, state.sName), i.name);
- if (!i.system.empty())
- mkString(*state.allocAttr(v, state.sSystem), i.system);
+ mkString(*state.allocAttr(v, state.sName), i.queryName());
+ auto system = i.querySystem();
+ if (!system.empty())
+ mkString(*state.allocAttr(v, state.sSystem), system);
mkString(*state.allocAttr(v, state.sOutPath), i.queryOutPath());
if (drvPath != "")
mkString(*state.allocAttr(v, state.sDrvPath), i.queryDrvPath());