mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/hardware/printers: fix ppdOptions of ensured printers
Commita52e27d4f6
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 commitd93fb1bd10
)
This commit is contained in:
parent
2fd9defcd3
commit
afb0ad038c
@ -13,7 +13,7 @@ let
|
|||||||
} // optionalAttrs (p.description != null) {
|
} // optionalAttrs (p.description != null) {
|
||||||
D = p.description;
|
D = p.description;
|
||||||
} // optionalAttrs (p.ppdOptions != {}) {
|
} // optionalAttrs (p.ppdOptions != {}) {
|
||||||
o = mapAttrsToList (name: value: "'${name}'='${value}'") p.ppdOptions;
|
o = mapAttrsToList (name: value: "${name}=${value}") p.ppdOptions;
|
||||||
});
|
});
|
||||||
in ''
|
in ''
|
||||||
${pkgs.cups}/bin/lpadmin ${args} -E
|
${pkgs.cups}/bin/lpadmin ${args} -E
|
||||||
|
Loading…
Reference in New Issue
Block a user