lib/strings/toShellVars: handle derivations as strings

This commit is contained in:
Naïm Favier
2022-05-07 13:37:03 +02:00
parent 7dbfd6b997
commit 4d2ea62d82
2 changed files with 17 additions and 4 deletions

View File

@@ -269,6 +269,15 @@ runTests {
strings
possibly newlines
'';
drv = {
outPath = "/drv";
foo = "ignored attribute";
};
path = /path;
stringable = {
__toString = _: "hello toString";
bar = "ignored attribute";
};
}}
'';
expected = ''
@@ -277,6 +286,9 @@ runTests {
declare -A assoc=(['with some']='strings
possibly newlines
')
drv='/drv'
path='/path'
stringable='hello toString'
'';
};