wlib.modules.makeWrapperNix
A partial and experimental pure nix implementation of the makeWrapper interface
Allows expansion of variables at runtime in flags and environment variable values
addFlag
This option takes a list. To group them more strongly, option may take a list of lists as well.
Values may contain environment variable references using $ to expand at runtime
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:
appendFlag
like flags and addFlag, except appends after the runtime user’s arguments
Values may contain environment variable references using $ to expand at runtime
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.
Values may contain environment variable references using $ to expand at runtime
Type: null or string
Default:
null
Declared by:
env
Environment variables to set in the wrapper.
Values may contain environment variable references using $ to expand at runtime
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:
escapingFunction
The function to use to escape shell arguments before concatenation
default: wlib.escapeShellArgWithEnv
Type: function that evaluates to a(n) string
Default:
<function>
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.
Values may contain environment variable references using $ to expand at runtime
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:
prefixVar
[ “ENV” “SEP” “VAL” ]
Prefix ENV with VAL, separated by SEP.
Values may contain environment variable references using $ to expand at runtime
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
runShell
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:
suffixVar
[ “ENV” “SEP” “VAL” ]
Suffix ENV with VAL, separated by SEP.
Values may contain environment variable references using $ to expand at runtime
Type: DAG LIST of (List of length 3)
Default:
[ ]
Declared by:
unsetVar
Remove VAR from the environment.
Type: DAG LIST of string
Default:
[ ]
Declared by: