wlib.wrapperModules.nushell
addFlag
Wrapper for
–add-flag ARG
Prepend the single argument ARG to the invocation of the executable, before any command-line arguments.
This option takes a list. To group them more strongly, option may take a list of lists as well.
Any entry can instead be of type { data, name ? null, before ? [], after ? [] }
This will cause it to be added to the DAG.
If no name is provided, it cannot be targeted.
Type: DAG LIST of (str | path | v ? outPath) or list of (str | path | v ? outPath)
Default:
[ ]
Declared by:
aliases
Aliases for the package to also be added to the PATH
Type: list of string
Default:
[ ]
Declared by:
appendFlag
–append-flag ARG
Append the single argument ARG to the invocation of the executable, after any command-line arguments.
This option takes a list. To group them more strongly, option may take a list of lists as well.
Any entry can instead be of type { data, name ? null, before ? [], after ? [] }
This will cause it to be added to the DAG.
If no name is provided, it cannot be targeted.
Type: DAG LIST of (str | path | v ? outPath) or list of (str | path | v ? outPath)
Default:
[ ]
Declared by:
argv0
–argv0 NAME
Set the name of the executed process to NAME. If unset or empty, defaults to EXECUTABLE.
overrides the setting from argv0type if set.
Type: null or string
Default:
null
Declared by:
argv0type
argv0 overrides this option if not null or unset
"inherit":
--inherit-argv0
The executable inherits argv0 from the wrapper.
Use instead of --argv0 '$0'.
"resolve":
--resolve-argv0
If argv0 does not include a “/” character, resolve it against PATH.
Type: one of “resolve”, “inherit”
Default:
"inherit"
Declared by:
chdir
–chdir DIR
Change working directory before running the executable.
Use instead of --run "cd DIR".
Type: DAG LIST of str | path | v ? outPath
Default:
[ ]
Declared by:
"config.nu"
The main Nushell configuration file.
Provide either .content to inline the file contents or .path to reference an existing file.
This file is passed to Nushell using --config, and controls general shell behavior,
key bindings, and built-in command settings.
Type: submodule
Default:
{
content = "";
}
Declared by:
"config.nu".content
Content of the file. This can be a multi-line string that will be written to the Nix store and made available via the path option.
Type: strings concatenated with “\n”
Declared by:
"config.nu".path
The path to the file. By default, this is automatically generated using pkgs.writeText with the attribute name and content.
Type: str | path | v ? outPath
Default:
"pkgs.writeText name <content>"
Declared by:
env
Environment variables to set in the wrapper.
This option takes a set.
Any entry can instead be of type { data, before ? [], after ? [] }
This will cause it to be added to the DAG, which will cause the resulting wrapper argument to be sorted accordingly
Type: DAG of str | path | v ? outPath
Default:
{ }
Declared by:
"env.nu"
The Nushell environment configuration file.
Provide either .content to inline the file contents or .path to reference an existing file.
This file is passed to Nushell using --env-config, and is typically used to define
environment variables or startup commands that apply to all shells.
Type: submodule
Default:
{
content = "";
}
Declared by:
"env.nu".content
Content of the file. This can be a multi-line string that will be written to the Nix store and made available via the path option.
Type: strings concatenated with “\n”
Declared by:
"env.nu".path
The path to the file. By default, this is automatically generated using pkgs.writeText with the attribute name and content.
Type: str | path | v ? outPath
Default:
"pkgs.writeText name <content>"
Declared by:
envDefault
Environment variables to set in the wrapper.
Like env, but only adds the variable if not already set in the environment.
This option takes a set.
Any entry can instead be of type { data, before ? [], after ? [] }
This will cause it to be added to the DAG, which will cause the resulting wrapper argument to be sorted accordingly
Type: DAG of str | path | v ? outPath
Default:
{ }
Declared by:
extraPackages
Additional packages to add to the wrapper’s runtime PATH. This is useful if the wrapped program needs additional libraries or tools to function correctly.
Adds all its entries to the DAG under the name NIX_PATH_ADDITIONS
Type: list of package
Default:
[ ]
Declared by:
filesToExclude
List of file paths (glob patterns) relative to package root to exclude from the wrapped package.
This allows filtering out unwanted binaries or files.
Example: [ "bin/unwanted-tool" "share/applications/*.desktop" ]
Type: list of string
Default:
[ ]
Declared by:
filesToPatch
List of file paths (glob patterns) relative to package root to patch for self-references. Desktop files are patched by default to update Exec= and Icon= paths.
Type: list of string
Default:
[
"share/applications/*.desktop"
]
Declared by:
flagSeparator
Separator between flag names and values when generating args from flags.
" " for --flag value or "=" for --flag=value
Type: string
Default:
" "
Declared by:
flags
Flags to pass to the wrapper. The key is the flag name, the value is the flag value. If the value is true, the flag will be passed without a value. If the value is false or null, the flag will not be passed. If the value is a list, the flag will be passed multiple times with each value.
This option takes a set.
Any entry can instead be of type { data, before ? [], after ? [] }
This will cause it to be added to the DAG, which will cause the resulting wrapper argument to be sorted accordingly
Type: DAG of null or boolean or (str | path | v ? outPath) or list of (str | path | v ? outPath)
Default:
{ }
Declared by:
makeWrapper
makeWrapper implementation to use (default pkgs.makeWrapper)
prefer useBinaryWrapper boolean if using wlib.modules.makeWrapper
as doing so will disable fields it does not support as well.
Type: null or package
Default:
null
Declared by:
prefixContents
–prefix-contents ENV SEP FILES
Like --suffix-each, but contents of FILES are read first and used as VALS.
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
prefixVar
–prefix ENV SEP VAL
Prefix ENV with VAL, separated by SEP.
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
rawWrapperArgs
DAG list (DAL) or dependency list of wrapper arguments, escaped with lib.escapeShellArgs
wrapper arguments refers to this:
pkgs/build-support/setup-hooks/make-wrapper.sh
pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh
This option takes a list. To group them more strongly, option may take a list of lists as well.
Any entry can instead be of type { data, name ? null, before ? [], after ? [] }
This will cause it to be added to the DAG.
If no name is provided, it cannot be targeted.
Type: DAG LIST of (str | path | v ? outPath) or list of (str | path | v ? outPath)
Default:
[ ]
Declared by:
runShell
–run COMMAND
Run COMMAND before executing the main program.
This option takes a list. To group them more strongly, option may take a list of lists as well.
Any entry can instead be of type { data, name ? null, before ? [], after ? [] }
This will cause it to be added to the DAG.
If no name is provided, it cannot be targeted.
Type: DAG LIST of str | path | v ? outPath
Default:
[ ]
Declared by:
runtimeLibraries
Additional libraries to add to the wrapper’s runtime LD_LIBRARY_PATH. This is useful if the wrapped program needs additional libraries or tools to function correctly.
Adds all its entries to the DAG under the name NIX_LIB_ADDITIONS
Type: list of package
Default:
[ ]
Declared by:
suffixContents
–suffix-contents ENV SEP FILES
Like --prefix-each, but contents of FILES are read first and used as VALS.
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
suffixVar
–suffix ENV SEP VAL
Suffix ENV with VAL, separated by SEP.
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
unsafeWrapperArgs
DAG list (DAL) or dependency list of wrapper arguments, concatenated with spaces
wrapper arguments refers to this:
pkgs/build-support/setup-hooks/make-wrapper.sh
pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh
This option takes a list. To group them more strongly, option may take a list of lists as well.
Any entry can instead be of type { data, name ? null, before ? [], after ? [] }
This will cause it to be added to the DAG.
If no name is provided, it cannot be targeted.
Type: DAG LIST of (str | path | v ? outPath) or list of (str | path | v ? outPath)
Default:
[ ]
Declared by:
unsetVar
–unset VAR
Remove VAR from the environment.
Type: DAG LIST of string
Default:
[ ]
Declared by:
useBinaryWrapper
changes the makeWrapper implementation from pkgs.makeWrapper to pkgs.makeBinaryWrapper
also disables --run, --prefix-contents, and --suffix-contents,
as they are not supported by pkgs.makeBinaryWrapper
Type: boolean
Default:
false
Declared by:
wrapperArgEscaping
Controls which wlib.modules.makeWrapperBase option to pass the generated wrapper arguments to
if value is true then the wrapper arguments will be passed to config.rawWrapperArgs
if value is false then the wrapper arguments will be passed to config.unsafeWrapperArgs
WARNING: These arguments are passed to makeWrapper at build time! Not escaping may not do what you expect!
Type: boolean
Default:
true
Declared by: