API Documentation
The following are all the options that you can use in wrapper-manager.
Main API
wrapperType
Which wrapper type to use by default for all wrappers.
one of "shell", "binary"
"binary"
"shell"
wrappers
Wrappers to create.
attribute set of (submodule)
{
hello = {
basePackage = pkgs.hello;
prependFlags = [
"-g"
"Hi"
];
};
}
wrappers.<name>.appendFlags
Flags passed after any arguments to the wrapped program. Usually you want to use prependFlags instead.
list of (string or anything convertible to it)
[ ]
["--config-file" ./config.toml]
wrappers.<name>.basePackage
Program to be wrapped
wrappers.<name>.env
Structured configuration for environment variables.
attribute set of (submodule)
{ }
{
GIT_CONFIG.value = ./gitconfig;
}
wrappers.<name>.env.<name>.force
Whether the value should be always set to the specified value.
If set to true
, the program will not inherit the value of the variable
if it's already present in the environment.
Setting it to false when unsetting a variable (value = null) will make the option have no effect.
boolean
true if `value` is null, otherwise false
true
wrappers.<name>.env.<name>.name
Name of the variable.
string
"‹name›"
"GIT_CONFIG"
wrappers.<name>.env.<name>.value
Value of the variable to be set.
Set to null
to unset the variable.
Note that any environment variable will be escaped. For example, value = "$HOME"
will be converted to the literal $HOME
, with its dollar sign.
null or (string or anything convertible to it)
./gitconfig
wrappers.<name>.extraPackages
Optional extra packages to also wrap
wrappers.<name>.extraWrapperFlags
Raw flags passed to makeWrapper. You may want to use wrapFlags instead.
strings concatenated with " "
""
"--argv0 foo --set BAR value"
wrappers.<name>.flags
(Deprecated) Flags passed before any arguments to the wrapped program. Use prependFlags instead
list of (string or anything convertible to it)
[ ]
wrappers.<name>.overrideAttrs
Function to override attributes from the final package.
function that evaluates to a(n) (attribute set)
lib.id
old: {
pname = "${pname}-with-settings";
}
wrappers.<name>.pathAdd
Packages to append to PATH.
list of package
[ ]
[ pkgs.starship ]
wrappers.<name>.postBuild
Raw commands to execute after the wrapping process has finished
string
""
''
echo "Running sanity check"
$out/bin/nvim '+q'
''
wrappers.<name>.prependFlags
Flags passed before any arguments to the wrapped program.
list of (string or anything convertible to it)
[ ]
["--config-file" ./config.toml]
wrappers.<name>.wrapFlags
Structured flags passed to makeWrapper.
list of (string or anything convertible to it)
[ ]
[
"--argv0"
"myprog"
]
wrappers.<name>.wrapped
(Read-only) The final wrapped package
wrappers.<name>.wrapperType
Whether to use a binary or a shell wrapper.
one of "shell", "binary"
"binary"
"shell"
Program configuration
wrappers.<name>.programs
Wrap specific binaries with specific options. You may use it to skip wrapping some program.
attribute set of (submodule)
{ }
{
supervim = {
target = "neovim";
};
git = {
env.GIT_CONFIG.value = ./gitconfig;
};
# Don't wrap scalar
scalar = {};
}
wrappers.<name>.programs.<name>.appendFlags
Flags passed after any arguments to the wrapped program. Usually you want to use prependFlags instead.
list of (string or anything convertible to it)
[ ]
["--config-file" ./config.toml]
wrappers.<name>.programs.<name>.env
Structured configuration for environment variables.
attribute set of (submodule)
{ }
{
GIT_CONFIG.value = ./gitconfig;
}
wrappers.<name>.programs.<name>.env.<name>.force
Whether the value should be always set to the specified value.
If set to true
, the program will not inherit the value of the variable
if it's already present in the environment.
Setting it to false when unsetting a variable (value = null) will make the option have no effect.
boolean
true if `value` is null, otherwise false
true
wrappers.<name>.programs.<name>.env.<name>.name
Name of the variable.
string
"‹name›"
"GIT_CONFIG"
wrappers.<name>.programs.<name>.env.<name>.value
Value of the variable to be set.
Set to null
to unset the variable.
Note that any environment variable will be escaped. For example, value = "$HOME"
will be converted to the literal $HOME
, with its dollar sign.
null or (string or anything convertible to it)
./gitconfig
wrappers.<name>.programs.<name>.extraWrapperFlags
Raw flags passed to makeWrapper. You may want to use wrapFlags instead.
strings concatenated with " "
""
"--argv0 foo --set BAR value"
wrappers.<name>.programs.<name>.flags
(Deprecated) Flags passed before any arguments to the wrapped program. Use prependFlags instead
list of (string or anything convertible to it)
[ ]
wrappers.<name>.programs.<name>.name
Name of the program
wrappers.<name>.programs.<name>.pathAdd
Packages to append to PATH.
list of package
[ ]
[ pkgs.starship ]
wrappers.<name>.programs.<name>.prependFlags
Flags passed before any arguments to the wrapped program.
list of (string or anything convertible to it)
[ ]
["--config-file" ./config.toml]
wrappers.<name>.programs.<name>.target
Target of the program
wrappers.<name>.programs.<name>.wrapFlags
Structured flags passed to makeWrapper.
list of (string or anything convertible to it)
[ ]
[
"--argv0"
"myprog"
]
wrappers.<name>.programs.<name>.wrapperType
Whether to use a binary or a shell wrapper.
one of "shell", "binary"
"binary"
"shell"