From ae0ed53b09cba991551e984f474bf5732d26d3f3 Mon Sep 17 00:00:00 2001 From: Niels Egberts Date: Fri, 9 Jul 2021 21:50:10 +0100 Subject: [PATCH] toString also coerces a set with an outPath attribute to a string nix-repl> builtins.toString { outPath = "somestring"; } "somestring" --- 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 e8569b654..209a05d11 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -3109,7 +3109,7 @@ static RegisterPrimOp primop_toString({ - A path (e.g., `toString /foo/bar` yields `"/foo/bar"`. - - A set containing `{ __toString = self: ...; }`. + - A set containing `{ __toString = self: ...; }` or `{ outPath = ...; }`. - An integer.