nixos/hardware/printers: fix ppdOptions of ensured printers

Commit a52e27d4f6
changed the `ensurePrinter` mechanism such that it uses
`lib.cli.toGNUCommandLineShell` to assemble the
`lpadmin` command line that creates the required printer.
Before that commit, the command line contained
single quotes (')to protect certain options from being
(mis-)interpreted by the shell.
The new mechanism no longer needs those quotes as
`lib.cli.toGNUCommandLineShell` takes care of quoting/escaping.
Unfortunatelly, the commit missed the
quotes around the `-o` command line part.
`lib.cli.toGNUCommandLineShell` now properly escapes
those quotes, thereby including them in the effective
command line arguments that are passed to `lpadmin`.
The result is that no option is applied anymore.

The commit at hand simply removes the superfluous quotes.
With this change, options are again properly applied as before.

(cherry picked from commit d93fb1bd10)
This commit is contained in:
Yarny0 2024-05-16 18:31:09 +02:00 committed by github-actions[bot]
parent 2fd9defcd3
commit afb0ad038c

View File

@ -13,7 +13,7 @@ let
} // optionalAttrs (p.description != null) {
D = p.description;
} // optionalAttrs (p.ppdOptions != {}) {
o = mapAttrsToList (name: value: "'${name}'='${value}'") p.ppdOptions;
o = mapAttrsToList (name: value: "${name}=${value}") p.ppdOptions;
});
in ''
${pkgs.cups}/bin/lpadmin ${args} -E