Skip to content

API Documentation

The following are all the options that you can use in wrapper-manager.

wrappers

Wrapper configuration. See the suboptions for configuration.

Type
plaintext
attribute set of (submodule)
Default
nix
{ }
Declaration

wrappers.<name>.appendFlags

Append a flag to the invocation of the program, after any arguments passed to the wrapped executable.

Type
plaintext
list of (string or anything convertible to it)
Default
nix
[ ]
Example
nix
[
  "--config" ./config.sh
  "--ascii" ./ascii
]
Declaration

wrappers.<name>.basePackage

Program to be wrapped.

Type
plaintext
package
Example
nix
pkgs.nix
Declaration

wrappers.<name>.env

Structured environment variables.

Type
plaintext
attribute set of (submodule)
Default
nix
{ }
Example
nix
{
  NIX_CONFIG = {
    value = "allow-import-from-derivation = false";
  };
}
Declaration

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.

Type
plaintext
boolean
Default
plaintext
true if `value` is null, otherwise false
Declaration

wrappers.<name>.env.<name>.name

Name of the variable.

Type
plaintext
string
Default
nix
"‹name›"
Declaration

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.

Type
plaintext
null or (string or anything convertible to it)
Declaration

wrappers.<name>.extraPackages

Extra packages to also wrap.

Type
plaintext
list of package
Default
nix
[ ]
Example
nix
[ pkgs.git-extras pkgs.delta ]
Declaration

wrappers.<name>.extraWrapperFlags

Raw flags passed to makeWrapper.

See upstream documentation for make-wrapper.sh : https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/make-wrapper.sh

Type
plaintext
strings concatenated with " "
Default
nix
""
Example
nix
"--argv0 foo --set BAR value"
Declaration

wrappers.<name>.flags

Alias of {option}prependFlags.

Type
plaintext
list of (string or anything convertible to it)
Declaration

wrappers.<name>.overrideAttrs

Function to override attributes from the final package.

Type
plaintext
function that evaluates to a(n) (attribute set)
Default
nix
<function>
Example
nix
''
  old: {
    pname = "''${old.pname}-wrapped";
  }
''
Declaration

wrappers.<name>.pathAdd

Packages to append to PATH.

Type
plaintext
list of package
Default
nix
[ ]
Example
nix
[ pkgs.starship ]
Declaration

wrappers.<name>.postBuild

Extra fragment of bash to be run after the main wrapper-manager code.

Type
plaintext
string
Default
nix
""
Example
nix
''
  $out/bin/nvim -l ''${./check.lua}
''
Declaration

wrappers.<name>.prependFlags

Prepend a flag to the invocation of the program, before any arguments passed to the wrapped executable.

Type
plaintext
list of (string or anything convertible to it)
Default
nix
[ ]
Example
nix
[
  "--config" ./config.sh
  "--ascii" ./ascii
]
Declaration

wrappers.<name>.renames

Map of renames FROM = TO. Renames every binary /bin/FROM to /bin/TO, adjusting other necessary files.

Type
plaintext
attribute set of string
Default
nix
{ }
Example
nix
{
  nvim = "custom-nvim";
}
Declaration

wrappers.<name>.wrapped

(Output) Final wrapped package.

Type
plaintext
package
Declaration

Outputs

build.packages

(Output) Attribute set of name=pkg. Useful for adding them to a flake's packages output.

Type
plaintext
attribute set of package
Declaration

build.toplevel

(Output) Derivation that merges all the wrappers into a single package.

Type
plaintext
package
Declaration