From 0ee1ca628affcf992f3ec0cd0c9344fd825b9825 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 18 Oct 2014 20:25:55 -0400 Subject: baseNameOf: Don't copy paths to the store first --- src/libexpr/primops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 50d03f369bf9..a7884cb85521 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -730,7 +730,7 @@ static void prim_pathExists(EvalState & state, const Pos & pos, Value * * args, static void prim_baseNameOf(EvalState & state, const Pos & pos, Value * * args, Value & v) { PathSet context; - mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context)), context); + mkString(v, baseNameOf(state.coerceToString(pos, *args[0], context, false, false)), context); } -- cgit 1.4.1 From c9bd6a1de41eb7f137e628df4a127ac8941ec07d Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 18 Oct 2014 20:34:48 -0400 Subject: Fix context test --- tests/lang/eval-okay-context.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lang/eval-okay-context.nix b/tests/lang/eval-okay-context.nix index 8cd8f2e131d8..7b9531cfe9e1 100644 --- a/tests/lang/eval-okay-context.nix +++ b/tests/lang/eval-okay-context.nix @@ -1,4 +1,4 @@ -let s = "foo ${builtins.substring 33 100 (baseNameOf ./eval-okay-context.nix)} bar"; +let s = "foo ${builtins.substring 33 100 (baseNameOf "${./eval-okay-context.nix}")} bar"; in if s != "foo eval-okay-context.nix bar" then abort "context not discarded" -- cgit 1.4.1