mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-27 20:51:03 +01:00
recoll: fix generation of string lists
The updated implementation will quote string lists as per the description at https://www.lesbonscomptes.com/recoll/usermanual/#RCL.INSTALL.CONFIG Fixes #3732
This commit is contained in:
parent
547a3bc8d4
commit
b9e3a29864
4 changed files with 21 additions and 17 deletions
|
|
@ -10,15 +10,16 @@ let
|
|||
# see the example configuration from the package (i.e.,
|
||||
# `$out/share/recoll/examples/recoll.conf`).
|
||||
mkRecollConfKeyValue = generators.mkKeyValueDefault {
|
||||
mkValueString = v:
|
||||
if v == true then
|
||||
"1"
|
||||
else if v == false then
|
||||
"0"
|
||||
else if isList v then
|
||||
concatStringsSep " " v
|
||||
else
|
||||
generators.mkValueStringDefault { } v;
|
||||
mkValueString = let mkQuoted = v: ''"${escape [ ''"'' ] v}"'';
|
||||
in v:
|
||||
if v == true then
|
||||
"1"
|
||||
else if v == false then
|
||||
"0"
|
||||
else if isList v then
|
||||
concatMapStringsSep " " mkQuoted v
|
||||
else
|
||||
generators.mkValueStringDefault { } v;
|
||||
} " = ";
|
||||
|
||||
# A modified version of 'lib.generators.toINI' that also accepts top-level
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue