wrapper-manager-fds/modules: update module descriptions and disable escaping pathAdd

`makeWrapperBinary` already escapes it so it would be problematic.
This commit is contained in:
Gabriel Arazas 2024-07-21 16:22:12 +08:00
parent 07683e2147
commit b6b9be6648
2 changed files with 15 additions and 8 deletions

View File

@ -93,9 +93,13 @@ let
preScript = lib.mkOption { preScript = lib.mkOption {
type = lib.types.lines; type = lib.types.lines;
description = '' description = ''
Script fragments to run before the main executable. This option is only Script fragments to run before the main executable.
used when the wrapper script is not compiled into a binary (that is,
when {option}`build.isBinary` is set to `false`). ::: {.note}
This option is only used when the wrapper script is not compiled
into a binary (that is, when {option}`build.isBinary` is set to
`false`).
:::
''; '';
default = ""; default = "";
example = lib.literalExpression '' example = lib.literalExpression ''
@ -106,7 +110,8 @@ let
makeWrapperArgs = lib.mkOption { makeWrapperArgs = lib.mkOption {
type = with lib.types; listOf str; type = with lib.types; listOf str;
description = '' description = ''
A list of extra arguments to be passed as part of makeWrapper. A list of extra arguments to be passed as part of `makeWrapper`
build step.
''; '';
example = [ "--inherit-argv0" ]; example = [ "--inherit-argv0" ];
}; };
@ -118,7 +123,7 @@ let
] ]
++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env) ++ (lib.mapAttrsToList (n: v: "--set ${n} ${v}") config.env)
++ (builtins.map (v: "--unset ${v}") config.unset) ++ (builtins.map (v: "--unset ${v}") config.unset)
++ (builtins.map (v: "--prefix 'PATH' ':' ${lib.escapeShellArg v}") config.pathAdd) ++ (builtins.map (v: "--prefix 'PATH' ':' ${v}") config.pathAdd)
++ (builtins.map (v: "--add-flags ${v}") config.prependArgs) ++ (builtins.map (v: "--add-flags ${v}") config.prependArgs)
++ (builtins.map (v: "--append-flags ${v}") config.appendArgs) ++ (builtins.map (v: "--append-flags ${v}") config.appendArgs)
++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") ( ++ (lib.optionals (!envConfig.build.isBinary && config.preScript != "") (
@ -156,7 +161,7 @@ in
description = '' description = ''
A list of packages to be included in the wrapper package. A list of packages to be included in the wrapper package.
::: {note} ::: {.note}
This can override some of the binaries included in this list which is This can override some of the binaries included in this list which is
typically intended to be used as a wrapped package. typically intended to be used as a wrapped package.
::: :::

View File

@ -17,7 +17,7 @@ let
desktopName = lib.mkOption { desktopName = lib.mkOption {
type = lib.types.nonEmptyStr; type = lib.types.nonEmptyStr;
description = "Specific name of the application"; description = "Specific name of the application.";
default = name; default = name;
example = "Firefox"; example = "Firefox";
}; };
@ -31,7 +31,7 @@ let
genericName = lib.mkOption { genericName = lib.mkOption {
type = with lib.types; nullOr nonEmptyStr; type = with lib.types; nullOr nonEmptyStr;
description = "Generic name of the application"; description = "Generic name of the application.";
default = null; default = null;
example = "Web browser"; example = "Web browser";
}; };
@ -64,6 +64,8 @@ in
type = with lib.types; attrsOf (submodule xdgDesktopEntry); type = with lib.types; attrsOf (submodule xdgDesktopEntry);
description = '' description = ''
A set of desktop entries to be exported along with the wrapped package. A set of desktop entries to be exported along with the wrapped package.
The attribute name will be used as the filename of the generated desktop
entry file.
''; '';
default = { }; default = { };
example = lib.literalExpression '' example = lib.literalExpression ''