Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

nix-wrapper-modules

A Nix library to create wrapped executables via the module system.

Are you annoyed by rewriting modules for every platform? nixos, home-manager, nix-darwin, devenv?

Then this library is for you!

Why use this?

Watch this excellent Video by Vimjoyer for an explanation:

This repository is very much like the one mentioned at the end.

However it has modules that are capable of much more, with a more consistent, flexible, and capable design.

Homeless Dotfiles with Nix Wrappers

Why rewrite lassulus/wrappers?

Yes, I know about this comic: xkcd 927

I heard that I could wrap programs with the module system, and then reapply more changes after, like override. I was excited.

But the project was tiny, there were not many modules yet.

"No problem!" I thought to myself, and began to write a module...

Turns out there were actually several problems.

The first, was that a significant amount of the options were not even accessible to the module system, and were instead only accessible to a secondary builder function.

There were many more things that were going to make it hard to use. So, I set about the task of fixing it.

However, when I began, the core was only about 700 lines of code.

Asking someone to accept someone else's rewrite of their entire project is a tall order, even if it doesn't break anything existing.

I wanted this thing to be the best it could be, but it was looking like the full extent of my changes would be a difficult sell for the maintainer to handle reading and maintaining.

It looked like only small pieces would be accepted, and at some point I gained a very clear vision of what I wanted.

It turns out what I wanted was significantly different from what that project was.

I rewrote it several times, and finally found what I feel to be the right set of capabilities and options.

Most everything you see in that video will work here too, but this is not intended to be a 1 for 1 compatible library.

Free of compatibility issues, I was able to start out with a consistent design from the start!

This repo is as close to 100% module-based as it could be.

All in all, I added over 3.5k lines of code and removed over 1k from the project, which was quite small to begin with. So, it is definitely now its own thing!

Long-term Goals

It is the ideal of this project to become a hub for everyone to contribute, so that we can all enjoy our portable configurations with as little individual strife as possible.

In service of that ideal, the immediate goal would be to transfer this repo to nix-community the moment that becomes an option.

Eventually I hope to have wrapper modules in nixpkgs, but again, nix-community would be the first step.

Short-term Goals

Help us add more modules! Contributors are what makes projects like these amazing!

Overview

This library provides two main components:

  • lib.evalModule: Function to create reusable wrapper modules with type-safe configuration options
    • And related, lib.wrapPackage: an alias for evalModule which returns the package directly and pre-imports the wlib.modules.default module for convenience
  • wrapperModules: Pre-built wrapper modules for common packages (tmux, wezterm, etc.)

Usage

Using Pre-built Wrapper Modules

{
  inputs.wrappers.url = "github:BirdeeHub/nix-wrapper-modules";

  outputs = { self, nixpkgs, wrappers }: {
    packages.x86_64-linux.default =
      wrappers.wrapperModules.mpv.wrap {
        pkgs = nixpkgs.legacyPackages.x86_64-linux;
        scripts = [ pkgs.mpvScripts.mpris ];
        "mpv.conf".content = ''
          vo=gpu
          hwdec=auto
        '';
        "mpv.input".content = ''
          WHEEL_UP seek 10
          WHEEL_DOWN seek -10
        '';
      };
  };
}

Creating Custom Wrapper Modules

{ wlib, lib }:

(wlib.evalModule ({ config, wlib, lib, ... }: {
  # You can only grab the final package if you supply pkgs!
  # But if you were making it for someone else, you would want them to do that!

  # inherit pkgs;

  imports = [ wlib.modules.default ]; # <-- includes wlib.modules.symlinkScript and wlib.modules.makeWrapper
  options = {
    profile = lib.mkOption {
      type = lib.types.enum [ "fast" "quality" ];
      default = "fast";
      description = "Encoding profile to use";
    };
    outputDir = lib.mkOption {
      type = lib.types.str;
      default = "./output";
      description = "Directory for output files";
    };
  };

  config.package = config.pkgs.ffmpeg;
  config.flags = {
    "-preset" = if config.profile == "fast" then "veryfast" else "slow";
  };
  config.env = {
    FFMPEG_OUTPUT_DIR = config.outputDir;
  };
})) # .config.wrapper to grab the final package! Only works if pkgs was supplied.

wrapProgram comes with wlib.modules.default already included, and outputs the package directly!

{ pkgs, wrappers, ... }:

wrappers.lib.wrapProgram ({ config, wlib, lib, ... }: {
  inherit pkgs; # you can only grab the final package if you supply pkgs!
  package = pkgs.curl;
  extraPackages = [ pkgs.jq ];
  env = {
    CURL_CA_BUNDLE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
  };
  flags = {
    "--silent" = true;
    "--connect-timeout" = "30";
  };
  flagSeparator = "=";  # Use --flag=value instead of --flag value (default is " ")
  runShell = [
  ''
    echo "Making request..." >&2
  ''
  ];
})

Extending Configurations

The .eval function allows you to extend an already-applied configuration with additional modules, similar to extendModules in NixOS.

The .apply function works the same way, but automatically grabs .config from the result of .eval for you, so you can have .wrap and .apply more easily available without evaluating.

The .wrap function works the same way, but automatically grabs .config.wrapper (the final package) from the result of .eval for you.

The package (via passthru) and the modules under .config both offer all 3 functions.

# Apply initial configuration
initialConfig = (wrappers.wrapperModules.tmux.eval {
  pkgs = pkgs;
  plugins = [ pkgs.tmuxPlugins.onedark-theme ];
}).config;

# Extend with additional configuration
extendedConfig = initialConfig.eval {
  clock24 = false;
};

# Access the wrapper
actualPackage = extendedConfig.config.wrapper;

# Extend it again!
apackage = (actualPackage.eval {
  vimVisualKeys = true;
  modeKeys = "vi";
  statusKeys = "vi";
}).config.wrapper;

# and again!
packageAgain = apackage.wrap {
  prefix = "C-Space";
};

alternatives

  • wrapper-manager by viperML. This project focuses more on a single module system, configuring wrappers and exporting them. This is something with a more granular approach with a single module per package and a collection of community made modules.

  • lassulus/wrappers the inspiration for the .apply interface for this library.

Core (builtin) Options set

These are the core options that make everything else possible.

They include the .apply, .eval, and .wrap functions, and the .wrapper itself

They are always imported with every module evaluation.

They are very minimal by design.

The default symlinkScript value provides no options.

The default wrapperFunction is null.

wlib.modules.default provides great values for these options, and creates many more for you to use.

But you may want to wrap your package via different means, provide different options, or provide modules for others to use to help do those things!

For example:

wlib.modules.makeWrapperNix is a partial reimplementation of wlib.modules.makeWrapper, but without using pkgs.makeWrapper at all!

In doing that, it allows for runtime variable expansion. You could use that instead of wlib.modules.makeWrapper if you wanted to alongside wlib.modules.symlinkScript

Excited to see what ways to use these options everyone comes up with! Docker helpers? BubbleWrap? If it's a derivation, it should be possible!


package

The base package to wrap. This means config.symlinkScript will be responsible for inheriting all other files from this package (like man page, /share, …)

Type: package

apply

Function to extend the current configuration with additional modules. Re-evaluates the configuration with the original settings plus the new module.

Type: function that evaluates to a(n) raw value (read only)

Default: <function>

binName

The name of the binary output by wrapperFunction. If not specified, the name of the package will be used. If set as an empty string, wrapperFunction may behave unpredictably, depending on its implementation.

Type: null or string

Default: null

eval

Function to extend the current configuration with additional modules. Re-evaluates the configuration with the original settings plus the new module. Returns the raw evaluated module.

Type: function that evaluates to a(n) raw value (read only)

Default: <function>

extraDrvAttrs

Extra attributes to add to the resulting derivation.

Type: attribute set of raw value

Default: { }

meta.maintainers

Maintainers of this wrapper module.

Type: list of (submodule)

Default: [ ]

meta.maintainers.*.email

email

Type: null or string

Default: null

meta.maintainers.*.github

GitHub username

Type: string

meta.maintainers.*.githubId

GitHub id

Type: signed integer

meta.maintainers.*.matrix

Matrix ID

Type: null or string

Default: null

meta.maintainers.*.name

name

Type: string

Default: "‹name›"

meta.platforms

Supported platforms

Type: list of string

Default:

[
  "... lib.platforms.all ..."
]

Example: "[ \"x86_64-linux\" \"aarch64-linux\" ]"

outputs

Override the list of nix outputs that get symlinked into the final package.

Type: null or (list of string)

Default: null

passthru

Additional attributes to add to the resulting derivation’s passthru. This can be used to add additional metadata or functionality to the wrapped package. This will always contain options, config and settings, so these are reserved names and cannot be used here.

Type: attribute set

Default: { }

pkgs

The nixpkgs pkgs instance to use.

Required in order to access .wrapper attribute, either directly, or indirectly.

Type: unspecified value

sourceStdenv

Whether to call $stdenv/setup to set up the environment before the symlinkScript

If any phases are enabled, also runs the enabled phases after the symlinkScript command has ran.

NOTE: often you may prefer to set extraDrvAttrs.phases = [ ... "buildPhase" etc ... ]; instead, to override this choice in a more fine-grained manner

Type: boolean

Default: true

symlinkScript

Outside of importing wlib.modules.symlinkScript module, which is included in wlib.modules.default, This is usually an option you will never have to redefine.

This option takes a function receiving the following arguments:

{
  wlib,
  config,
  outputs,
  binName,
  wrapper,
  ... # <- anything you can get from pkgs.callPackage
}:

The function is to return a string which will be added to the buildCommand of the wrapper. It is in charge of taking those options, and linking the files into place as requested.

binName is the value of config.binName if non-null, otherwise it is given a default value via baseNameOf lib.getExe on the config.package value

The value of config.binName is left as the user of the module set it, so that you can know who is giving you the value.

The same is true of the outputs argument.

wrapper is the result of calling wrapperFunction, or null if one was not provided.

Type: function that evaluates to a(n) string

Default: <function, args: {binName, config, lib, lndir, outputs, wlib, wrapper}>

wrap

Function to extend the current configuration with additional modules. Re-evaluates the configuration with the original settings plus the new module. Returns the updated package.

Type: function that evaluates to a(n) raw value (read only)

Default: <function>

wrapper

The final wrapped package.

You may still call .eval and the rest on the package again afterwards.

Accessing this value without defining pkgs option, either directly, or via some other means like .wrap, will cause an error.

Type: package (read only)

Default: <derivation hello>

wrapperFunction

A function which returns a package.

Arguments:

{ config, wlib, outputs, binName, /* other args from callPackage */ ... }

That package returned must contain "$out/bin/${binName}" as the executable to be wrapped. (unless you also override symlinkScript)

binName is the value of config.binName if non-null, otherwise it is given a default value via baseNameOf lib.getExe

The value of config.binName is left as the user of the module set it, so that you can know who is giving you the value.

The same is true of the outputs argument.

The usual implementation is imported via wlib.modules.makeWrapperBase

wlib.modules.makeWrapper and wlib.modules.default include that module automatically.

Type: null or (function that evaluates to a(n) package)

Default: null

wlib.modules.default

This module imports both wlib.modules.makeWrapper and wlib.modules.symlinkScript for convenience

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:

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:

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:

wlib documentation

Generated documentation for the wlib library.

Contains the main module evaluation function, and various other useful items.

wlib main set documentation

wlib.evalModules

calls nixpkgs.lib.evalModules with the core module imported and wlib added to specialArgs

wlib.evalModules takes the same arguments as nixpkgs.lib.evalModules

wlib.evalModule

evalModule = module: wlib.evalModules { modules = [ module ]; };

Evaluates the module along with the core options, using lib.evalModules

Takes a module as its argument. Returns the result from lib.evalModules directly.

To submit a module to this repo, this function must be able to evaluate it.

The wrapper module system integrates with NixOS module evaluation:

  • Uses lib.evalModules for configuration evaluation
  • Supports all standard module features (imports, conditionals, mkIf, etc.)
  • Provides config for accessing evaluated configuration
  • Provides options for introspection and documentation

wlib.wrapModule

Creates a reusable wrapper module.

Imports wlib.modules.default then evaluates the module. It then returns .config so that .wrap is easily accessible!

Use this when you want to quickly create a wrapper but without providing it a pkgs yet.

Equivalent to:

wrapModule = (wlib.evalModule wlib.modules.default).config.apply;

Example usage:

  helloWrapper = wrapModule ({ config, wlib, ... }: {
    options.greeting = lib.mkOption {
      type = lib.types.str;
      default = "hello";
    };
    config.package = config.pkgs.hello;
    config.flags = {
      "--greeting" = config.greeting;
    };
  };

  # This will return a derivation that wraps the hello package with the --greeting flag set to "hi".
  helloWrapper.wrap {
    pkgs = pkgs;
    greeting = "hi";
  };

wlib.wrapPackage

Imports wlib.modules.default then evaluates the module. It then returns the wrapped package.

Use this when you want to quickly create a wrapped package directly. Requires a pkgs to be set.

Equivalent to:

wrapModule = (wlib.evalModule wlib.modules.default).config.wrap;

mkOutOfStoreSymlink :: pkgs -> path -> { out = ...; ... }

Lifted straight from home manager, but requires pkgs to be passed to it first.

Creates a symlink to a local absolute path, does not check if it is a store path first.

Returns a store path that can be used for things which require a store path.

wlib.getPackageOutputsSet

getPackageOutputsSet :: Derivation -> AttrSet

Given a package derivation, returns an attribute set mapping each of its output names (e.g. "out", "dev", "doc") to the corresponding output path.

This is useful when a wrapper or module needs to reference multiple outputs of a single derivation. If the derivation does not define multiple outputs, an empty set is returned.

Example: getPackageOutputsSet pkgs.git => { out = /nix/store/...-git; man = /nix/store/...-git-man; }

wlib.escapeShellArgWithEnv

Escape a shell argument while preserving environment variable expansion.

This escapes backslashes and double quotes to prevent injection, then

wraps the result in double quotes.

Unlike lib.escapeShellArg which uses single quotes, this allows

environment variable expansion (e.g., $HOME, ${VAR}).

Caution! This is used by wlib.modules.makeWrapperNix to escape things, but the wlib.modules.makeWrapper implementation passes its args to pkgs.makeWrapper at build time, so it may not always do what you expect!

Example


escapeShellArgWithEnv "$HOME/config.txt"

=> "\"$HOME/config.txt\""

escapeShellArgWithEnv "/path/with\"quote"

=> "\"/path/with\\\"quote\""

escapeShellArgWithEnv "/path/with\\backslash"

=> "\"/path/with\\\\backslash\""

wlib.dag set documentation

wlib.dag.dagOf

A directed acyclic graph of some inner type.

Arguments:

  • elemType: type

Accepts an attrset of elements

The elements should be of type elemType or sets of the type { data, name ? null, before ? [], after ? [], ... } where the data field is of type elemType

name defaults to the key in the set.

Can be used in conjunction with wlib.dag.topoSort

Note, if the element type is a submodule then the name argument will always be set to the string "data" since it picks up the internal structure of the DAG values. To give access to the "actual" attribute name a new submodule argument is provided with the name dagName.

wlib.dag.dagWith

dagOf allows extra values beyond just after before data and name to be present.

dagWith accepts an attrset as its first parameter BEFORE elemType. You may include { strict = true; } to make it refuse to recognize sets with extra values.

wlib.dag.dalOf

A DAG LIST or (DAL) or dependency list of some inner type

Arguments:

  • elemType: type

Accepts a LIST of elements

The elements should be of type elemType or sets of the type { data, name ? null, before ? [], after ? [], ... } where the data field is of type elemType

If a name is not given, it cannot be targeted by other values.

Can be used in conjunction with wlib.dag.topoSort

Note, if the element type is a submodule then the name argument will always be set to the string "data" since it picks up the internal structure of the DAG values. To give access to the "actual" attribute name a new submodule argument is provided with the name dagName.

wlib.dag.dalWith

dalOf allows extra values beyond just after before data and name to be present.

dalWith accepts an attrset as its first parameter BEFORE elemType. You may include { strict = true; } to make it refuse to recognize sets with extra values.

wlib.dag.isEntry

Determines whether a value is a valid DAG entry (allows extra values)

wlib.dag.isDag

determines whether a value is of the attrset type and all values are dag entries

wlib.dag.isDal

determines whether a value is of the list type and all values are dag entries

wlib.dag.topoSort

Takes an attribute set containing entries built by entryAnywhere, entryAfter, and entryBefore to a topologically sorted list of entries.

Alternatively, it can take a dal (dependency list) instead. Which is a list of such entries.

Internally this function uses the topoSort function in <nixpkgs/lib/lists.nix> and its value is accordingly.

Specifically, the result on success is

   { result = [ { name = ?; data = ?; } … ] }

For example

   nix-repl> topoSort {
               a = entryAnywhere "1";
               b = entryAfter [ "a" "c" ] "2";
               c = entryBefore [ "d" ] "3";
               d = entryBefore [ "e" ] "4";
               e = entryAnywhere "5";
             } == {
               result = [
                 { data = "1"; name = "a"; }
                 { data = "3"; name = "c"; }
                 { data = "2"; name = "b"; }
                 { data = "4"; name = "d"; }
                 { data = "5"; name = "e"; }
               ];
             }
   true

And the result on error is

   {
     cycle = [ { after = ?; name = ?; data = ? } … ];
     loops = [ { after = ?; name = ?; data = ? } … ];
   }

For example

   nix-repl> topoSort {
               a = entryAnywhere "1";
               b = entryAfter [ "a" "c" ] "2";
               c = entryAfter [ "d" ] "3";
               d = entryAfter [ "b" ] "4";
               e = entryAnywhere "5";
             } == {
               cycle = [
                 { after = [ "a" "c" ]; data = "2"; name = "b"; }
                 { after = [ "d" ]; data = "3"; name = "c"; }
                 { after = [ "b" ]; data = "4"; name = "d"; }
               ];
               loops = [
                 { after = [ "a" "c" ]; data = "2"; name = "b"; }
               ];
             }
   true

dag

: Function argument

wlib.dag.gmap

Applies a function to each element of the given DAG.

wlib.dag.lmap

Applies a function to each element of the given DAL.

wlib.dag.entryBetween

Creates a DAG entry with specified before and after dependencies.

wlib.dag.entryAnywhere

Create a DAG entry with no particular dependency information.

wlib.dag.entryAfter

Convenience function to create a DAG entry that should come after certain nodes.

wlib.dag.entryBefore

Convenience function to create a DAG entry that should come before certain nodes.

wlib.dag.entriesBetween

Given a list of entries, this function places them in order within the DAG. Each entry is labeled "${tag}-${entry index}" and other DAG entries can be added with 'before' or 'after' referring these indexed entries.

The entries as a whole can be given a relation to other DAG nodes. All generated nodes are then placed before or after those dependencies.

wlib.dag.entriesAnywhere

Convenience function for creating multiple entries without specific dependencies.

wlib.dag.entriesAfter

Convenience function for creating multiple entries that must be after another entry

wlib.dag.entriesBefore

Convenience function for creating multiple entries that must be before another entry

wlib.dag.sortAndUnwrap

Convenience function for resolving a DAG or DAL and getting the result in a sorted list of DAG entries

Unless you make use of mapIfOk, the result is still a DAL, but sorted.

Arguments:

{
  name ? "DAG", # for error message
  dag,
  mapIfOk ? null,
}

wlib.types set documentation

wlib.types.dalOf

Arguments:

  • elemType: type

Accepts a LIST of elements

The elements should be of type elemType or sets of the type { data, name ? null, before ? [], after ? [], ... } where the data field is of type elemType

If a name is not given, it cannot be targeted by other values.

Can be used in conjunction with wlib.dag.topoSort

wlib.types.dagOf

Arguments:

  • elemType: type

Accepts an attrset of elements

The elements should be of type elemType or sets of the type { data, name ? null, before ? [], after ? [], ... } where the data field is of type elemType

name defaults to the key in the set.

Can be used in conjunction with wlib.dag.topoSort

wlib.types.stringable

Type for a value that can be converted to string "${like_this}"

wlib.types.fixedList

Arguments:

  • length: int,
  • elemType: type

It's a list, but it rejects lists of the wrong length.

Still has regular list merge across multiple definitions, best used inside another list

wlib.types.wrapperFlags

Arguments:

  • length: int,

len: wlib.types.dalOf (wlib.types.fixedList len wlib.types.stringable)

wlib.types.file

File type with content and path options

Arguments:

  • pkgs: nixpkgs instance

Fields:

  • content: File contents as string
  • path: Derived path using pkgs.writeText

wlib.modules

In this subsection are what we will call "helper modules".

They are just regular modules. The distinction is that they do not set config.package

Instead, their purpose is to create convenience options for you to use to define your own wrappers!

The example you will become most familiar with are the helper modules imported by wlib.modules.default

wlib.modules.default gets its options by importing 3 other modules.

wlib.modules.symlinkScript and wlib.modules.makeWrapper, which also imports wlib.modules.makeWrapperBase

But you could choose to have modules that have different abilities!

For example, someone may want to make a set of convenience options for wrapping your program with bubblewrap or some other sandboxing tool instead!

They could make a module for that, and submit it here for everyone to enjoy!

wlib.modules.makeWrapper

An implementation of the makeWrapper interface via type safe module options.

Imported by wlib.modules.default

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:

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:

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:

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:

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:

wlib.modules.makeWrapperBase

Takes dependency lists of wrapper arguments of escaped and unescaped varieties, and sorts them according to their listed dependencies, if any.

Imported by wlib.modules.makeWrapper

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:

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:

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:

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:

wlib.modules.symlinkScript

Adds extra options compared to the default symlinkScript option value.

Imported by wlib.modules.default

aliases

Aliases for the package to also be added to the PATH

Type: list of string

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:

wlib.wrapperModules

wrapper modules are modules which set config.package and define convenience options for wrapping that package with a configuration.

They are specific to that program, and make configuring programs in an ad-hoc way stress-free!

They include shortlist options for common configuration settings, and/or for providing a config file to use.

wlib.wrapperModules contains paths to these wrapper modules.

The flake also exports wrapper modules that have been partially evaluated for convenience.

This allows you to do something like inputs.nix-wrapper-modules.wrapperModules.tmux.wrap { inherit pkgs; prefix = "C-Space"; }, to build a package with a particular configuration quickly!

You can then export that package, and somebody else could call .wrap on it as well to change it again!

wlib.wrapperModules.alacritty

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:

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:

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:

settings

Configuration of alacritty. See alacritty(5) or https://alacritty.org/config-alacritty.html

Type: TOML value

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:

wlib.wrapperModules.foot

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:

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:

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:

settings

Configuration of foot terminal. See foot.ini(5)

Type: attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))

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:

wlib.wrapperModules.fuzzel

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:

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:

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:

settings

Configuration of fuzzel. See fuzzel.ini(5)

Type: attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))

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:

wlib.wrapperModules.helix

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:

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:

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:

extraSettings

Extra lines appended to the config file. This can be used to maintain order for settings.

Type: strings concatenated with “\n”

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:

ignores

List of paths to be ignored by the file-picker. The format is the same as in .gitignore.

Type: list of non-empty string

Default: [ ]

Declared by:

languages

Language specific settings See https://docs.helix-editor.com/languages.html

Type: TOML value

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:

settings

General settings See https://docs.helix-editor.com/configuration.html

Type: TOML value

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:

themes

Themes to add to config. See https://docs.helix-editor.com/themes.html

Type: attribute set of (TOML value or strings concatenated with “\n”)

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:

wlib.wrapperModules.jujutsu

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:

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:

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:

settings

Configuration for jujutsu. See https://jj-vcs.github.io/jj/latest/config/

Type: TOML value

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:

wlib.wrapperModules.mako

"--config"

Path to the generated Mako configuration file.

The file is built automatically from the settings option using the iniWithGlobalSection formatter. You can override this path to use a custom configuration file instead.

Example: –config=/etc/mako/config

Type: submodule

Default:

{
  path = <derivation mako-settings>;
}

Declared by:

"--config".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".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:

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:

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:

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:

settings

Configuration settings for mako. Can include both global settings and sections. All available options can be found here: https://github.com/emersion/mako/blob/master/doc/mako.5.scd.

Type: attribute set of (INI atom (null, bool, int, float or string) or attribute set of (INI atom (null, bool, int, float or string)))

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:

wlib.wrapperModules.mpv

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:

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:

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:

"mpv.conf"

The main MPV configuration file.

Provide .content to inline configuration options or .path to reference an existing mpv.conf. This file controls playback behavior, default options, video filters, and output settings. It is included by MPV using the --include flag.

Type: submodule

Default:

{
  content = "";
}

Declared by:

"mpv.conf".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:

"mpv.conf".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:

"mpv.input"

The MPV input configuration file.

Provide .content to inline bindings or .path to use an existing input.conf. This file defines custom key bindings and command mappings. It is passed to MPV using --input-conf.

Type: submodule

Default:

{
  content = "";
}

Declared by:

"mpv.input".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:

"mpv.input".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:

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:

scripts

A list of MPV user scripts to include via package override.

Each entry should be a derivation providing a Lua script or plugin compatible with MPV’s scripts/ directory. These are appended to MPV’s build with pkgs.mpv.override.

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:

wlib.wrapperModules.notmuch

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:

configFile

Path or inline definition of the generated Notmuch configuration file.

By default, this is automatically created from the settings option using the INI format generator.

Type: submodule

Default:

{
  path = "/nix/store/x8mls8d98w7l3sbk7zjvvlfaz2q1a3p3-notmuch.ini";
}

Declared by:

configFile.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:

configFile.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:

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:

settings

INI-style configuration for Notmuch.

This option defines the contents of the notmuch.ini configuration file. Use attribute sets to specify sections and key-value pairs. Example:

settings = {
  user = { name = "Alice"; primary_email = "alice@example.org"; };
  database = { path = "Maildir"; };
};

Type: attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))

Default:

{
  database = {
    mail_root = "Maildir";
    path = "Maildir";
  };
}

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:

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:

wlib.wrapperModules.rofi

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.rasi"

The main Rofi configuration file (config.rasi).

Provide either .content to inline the generated Rasi text or .path to reference an external file. By default this file is auto-generated from the values in settings and the selected theme. It is passed to Rofi using -config.

Type: submodule

Default:

{
  content = ''
    configuration {
    location: 0;
    xoffset: 0;
    yoffset: 0;
    }
  '';
}

Declared by:

"config.rasi".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.rasi".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:

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:

plugins

List of rofi plugins to be installed

Type: list of package

Default: [ ]

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:

settings

Configuration settings for rofi.

Type: (attribute set of (string or signed integer or boolean or (Rasi literal string) or list of (string or signed integer or boolean or (Rasi literal string)))) or string

Default:

{
  location = 0;
  xoffset = 0;
  yoffset = 0;
}

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:

theme

The Rofi theme specification.

Can be:

  • a string or path to an existing .rasi theme file,
  • or an attribute set describing Rasi sections and key/value pairs.

When an attribute set is provided, it is rendered to Rasi syntax automatically. The theme is included in "config.rasi" via an @theme directive.

Type: null or string or absolute path or attribute set of ((attribute set of (string or signed integer or boolean or (Rasi literal string) or list of (string or signed integer or boolean or (Rasi literal string)))) or string)

Default: null

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:

wlib.wrapperModules.tealdeer

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:

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:

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:

settings

Configuration of tealdeer. See <tealdeer-rs.github.io/tealdeer/config.html>

Type: TOML value

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:

wlib.wrapperModules.tmux

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:

aggressiveResize

Value for setw -g aggressive-resize.

Type: boolean

Default: false

Declared by:

aliases

Aliases for the package to also be added to the PATH

Type: list of string

Default: [ ]

Declared by:

allowPassthrough

Value for set -gq allow-passthrough.

Type: boolean

Default: true

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:

baseIndex

Value for set -g base-index.

Type: signed integer

Default: 1

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:

clock24

use 24 hour clock instead of 12 hour clock

Type: boolean

Default: true

Declared by:

configAfter

configuration to run after all tmux plugins are sourced

Type: strings concatenated with “\n”

Default: ""

Declared by:

configBefore

configuration to run before all tmux plugins are sourced

Type: strings concatenated with “\n”

Default: ""

Declared by:

disableConfirmationPrompt

disable the confirmation prompt for kill-window and kill-pane keybindings.

Type: boolean

Default: true

Declared by:

displayPanesColour

Value for set -g display-panes-colour.

Type: string

Default: "default"

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:

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:

escapeTime

Value for set -s escape-time.

Type: signed integer

Default: 500

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:

historyLimit

Value for set -g history-limit.

Type: signed integer

Default: 2000

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:

modeKeys

Value for set -g mode-keys.

Type: string

Default: "emacs"

Declared by:

mouse

Enable mouse mode.

Type: boolean

Default: true

Declared by:

paneBaseIndex

Value for setw -g pane-base-index.

Type: signed integer

Default: 1

Declared by:

plugins

List of tmux plugins to source.

Type: list of (package or (submodule))

Default: [ ]

Declared by:

prefix

Set the prefix key for tmux.

Type: string

Default: "C-b"

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:

secureSocket

Store tmux socket under /run, which is more secure than /tmp, but as a downside it doesn’t survive user logout.

Type: boolean

Default: false

Declared by:

setEnvironment

attrset of environment variables to set when the tmux session is created. set-environment -g ${key} "${value}"

Type: attribute set of (string or package)

Default: { }

Declared by:

shell

set -g default-shell

Type: null or string

Default: null

Declared by:

sourceSensible

Start with defaults from tmuxPlugins.sensible

Type: boolean

Default: true

Declared by:

statusKeys

Value for set -g status-keys.

Type: string

Default: "emacs"

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:

terminal

Value for set -g default-terminal.

Type: string

Default: "screen"

Declared by:

terminalOverrides

Value for set -ga terminal-overrides.

Type: null or string

Default: null

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:

updateEnvironment

List of environment variables to update when the tmux session is created. set-option -ga update-environment <your list of variables>

Type: list of string

Default:

[
  "TERM"
  "TERM_PROGRAM"
]

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:

vimVisualKeys

v and y keybindings for copy-mode-vi.

Type: boolean

Default: false

Declared by:

visualActivity

Value for set -g visual-activity.

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:

wlib.wrapperModules.wezterm

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:

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:

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:

luaInfo

anything other than uncalled nix functions can be put into this option, within your "wezterm.lua", you will be able to call require('nix-info') and get the values as lua values

the default "wezterm.lua" value is return require('nix-info')

This means, by default, this will act like your wezterm config file, unless you want to add some lua in between there.

Type: attribute set of raw value

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:

"wezterm.lua"

The wezterm config file. provide .content, or .path

Type: submodule

Default:

{
  content = "return require('nix-info')";
}

Declared by:

"wezterm.lua".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:

"wezterm.lua".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:

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: