about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/nixexpr-ast.def3
-rw-r--r--src/nix-env/main.cc9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libexpr/nixexpr-ast.def b/src/libexpr/nixexpr-ast.def
index fe5fe71b0a05..c7029e927047 100644
--- a/src/libexpr/nixexpr-ast.def
+++ b/src/libexpr/nixexpr-ast.def
@@ -44,6 +44,7 @@ Int | int | Expr |
 #
 # For canonicity, the store paths should be in sorted order.
 Str | string ATermList | Expr |
+Str | string | Expr | ObsoleteStr
 
 # A path is a reference to a file system object that is to be copied
 # to the Nix store when used as a derivation attribute.  When it is
@@ -67,7 +68,7 @@ Bool | ATerm | Expr |
 Null | | Expr |
 
 Bind | string Expr Pos | ATerm |
-Bind | string Expr | ATerm | Bind2
+Bind | string Expr | ATerm | ObsoleteBind
 Inherit | Expr ATermList Pos | ATerm |
 
 Scope | | Expr |
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index f67a0768979b..f2a9957306c9 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -107,10 +107,11 @@ struct AddPos : TermFun
 {
     ATerm operator () (ATerm e)
     {
-        ATerm x, y, z;
-        if (matchBind(e, x, y, z)) return e;
-        if (matchBind2(e, x, y))
+        ATerm x, y;
+        if (matchObsoleteBind(e, x, y))
             return makeBind(x, y, makeNoPos());
+        if (matchObsoleteStr(e, x))
+            return makeStr(x, ATempty);
         return e;
     }
 };
@@ -921,6 +922,8 @@ static void opQuery(Globals & globals,
             else
                 table.push_back(columns);
 
+            cout.flush();
+
         } catch (AssertionError & e) {
             /* !!! hm, maybe we should give some sort of warning here? */
         }