diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-03-28T20·58+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-03-28T20·58+0000 |
commit | f958bcdf1f9f66759a2512e4b7c0b0ba5647960a (patch) | |
tree | 0aea538fffa1e6d24c8e9ac320d4ce996c0c3c5c /src/libexpr/parser.y | |
parent | db3e644c1ce7d856dbaca7718fa0af8231c486d2 (diff) |
* Added an operator `~' to select paths within a derivation. E.g.,
{stdenv, bash}: derivation { builder = bash ~ /bin/sh; args = ["-e" "-x" ./builder.sh]; ... } Here the attribute `builder' will evaluate to, e.g., `/nix/store/1234abcd...-bash-2.0.1/bin/sh'.
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r-- | src/libexpr/parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 44d1e06abefa..b1fe9e093145 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -44,6 +44,7 @@ void yyerror(YYLTYPE * loc, yyscan_t scanner, void * data, char * s) %nonassoc EQ NEQ %right UPDATE %left NEG +%nonassoc '~' %% @@ -79,6 +80,7 @@ expr_op | expr_op OR expr_op { $$ = ATmake("OpOr(<term>, <term>)", $1, $3); } | expr_op IMPL expr_op { $$ = ATmake("OpImpl(<term>, <term>)", $1, $3); } | expr_op UPDATE expr_op { $$ = ATmake("OpUpdate(<term>, <term>)", $1, $3); } + | expr_op '~' expr_op { $$ = ATmake("SubPath(<term>, <term>)", $1, $3); } | expr_app ; |