From 647d73908b4726791db02ad8296875618b66bec0 Mon Sep 17 00:00:00 2001 From: Christopher Bacher Date: Sun, 16 Oct 2022 15:25:31 +0200 Subject: [PATCH] lib(util): toEnvValue converts list into the format '[A;B;C]' --- lib/util.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/util.nix b/lib/util.nix index 4b751fa..2b29586 100644 --- a/lib/util.nix +++ b/lib/util.nix @@ -20,5 +20,8 @@ in _accessValueOfFragment attrs fragment ; - toEnvValue = value: if builtins.isBool value then (if value then "true" else "false") else value; + toEnvValue = value: with builtins; + if isBool value then (if value then "true" else "false") + else if isList value then "[${concatStringSep ";" value}]" + else value; }