diff --git a/lib/strings.nix b/lib/strings.nix index 5fba13822e3f..edc31b4e9e36 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -395,7 +395,7 @@ rec { */ toShellVar = name: value: lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" ( - if isAttrs value && ! isCoercibleToString value then + if isAttrs value && ! isSimpleCoercibleToString value then "declare -A ${name}=(${ concatStringsSep " " (lib.mapAttrsToList (n: v: "[${escapeShellArg n}]=${escapeShellArg v}"