.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-bundle" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix bundle\fR - bundle an application so that it works outside of the Nix store .SH Synopsis \fCnix bundle\fR [\fIoption\fR\[u2026]] \fIinstallable\fR .SH Examples .IP "\(bu" 2 Bundle Hello: .LP .EX # nix bundle nixpkgs#hello # ./hello Hello, world! .EE .IP "\(bu" 2 Bundle a specific version of Nix: .LP .EX # nix bundle github:NixOS/nix/e3ddffb27e5fc37a209cfd843c6f7f6a9460a8ec # ./nix --version nix (Nix) 2.4pre20201215_e3ddffb .EE .IP "\(bu" 2 Bundle a Hello using a specific bundler: .LP .EX # nix bundle --bundler github:NixOS/bundlers#toDockerImage nixpkgs#hello # docker load < hello-2.10.tar.gz # docker run hello-2.10:latest hello Hello, world! .EE .SH Description \fCnix bundle\fR, by default, packs the closure of the \fIinstallable\fR into a single self-extracting executable. See the \fB\fCbundlers\fR homepage\fR (\fIhttps://github.com/NixOS/bundlers\fR) for more details. .RS .PP \fBNote\fR .PP This command only works on Linux. .RE .SH Flake output attributes If no flake output attribute is given, \fCnix bundle\fR tries the following flake output attributes: .IP "\(bu" 2 \fCbundlers..default\fR .LP If an attribute \fIname\fR is given, \fCnix run\fR tries the following flake output attributes: .IP "\(bu" 2 \fCbundlers..\fR .SH Bundlers A bundler is specified by a flake output attribute named \fCbundlers..\fR. It looks like this: .LP .EX bundlers.x86_64-linux = rec { identity = drv: drv; blender_2_79 = drv: self.packages.x86_64-linux.blender_2_79; default = identity; }; .EE .PP A bundler must be a function that accepts an arbitrary value (typically a derivation or app definition) and returns a derivation. .SH Options .IP "\(bu" 2 \fC--bundler\fR \fIflake-url\fR .br Use a custom bundler instead of the default (\fCgithub:NixOS/bundlers\fR). .IP "\(bu" 2 \fC--out-link\fR / \fC-o\fR \fIpath\fR .br Override the name of the symlink to the build result. It defaults to the base name of the app. .LP \fBCommon evaluation options:\fR .IP "\(bu" 2 \fC--arg\fR \fIname\fR \fIexpr\fR .br Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--argstr\fR \fIname\fR \fIstring\fR .br Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--eval-store\fR \fIstore-url\fR .br The Nix store to use for evaluations. .IP "\(bu" 2 \fC--impure\fR .br Allow access to mutable paths and repositories. .IP "\(bu" 2 \fC--include\fR / \fC-I\fR \fIpath\fR .br Add \fIpath\fR to the list of locations used to look up \fC<...>\fR file names. .IP "\(bu" 2 \fC--override-flake\fR \fIoriginal-ref\fR \fIresolved-ref\fR .br Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR. .LP \fBCommon flake-related options:\fR .IP "\(bu" 2 \fC--commit-lock-file\fR .br Commit changes to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--inputs-from\fR \fIflake-url\fR .br Use the inputs of the specified flake as registry entries. .IP "\(bu" 2 \fC--no-registries\fR .br Don\[u2019]t allow lookups in the flake registries. This option is deprecated; use \fC--no-use-registries\fR. .IP "\(bu" 2 \fC--no-update-lock-file\fR .br Do not allow any updates to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--no-write-lock-file\fR .br Do not write the flake\[u2019]s newly generated lock file. .IP "\(bu" 2 \fC--override-input\fR \fIinput-path\fR \fIflake-url\fR .br Override a specific flake input (e.g. \fCdwarffs/nixpkgs\fR). This implies \fC--no-write-lock-file\fR. .IP "\(bu" 2 \fC--recreate-lock-file\fR .br Recreate the flake\[u2019]s lock file from scratch. .IP "\(bu" 2 \fC--update-input\fR \fIinput-path\fR .br Update a specific flake input (ignoring its previous entry in the lock file). .LP \fBOptions that change the interpretation of installables:\fR .IP "\(bu" 2 \fC--derivation\fR .br Operate on the store derivation rather than its outputs. .IP "\(bu" 2 \fC--expr\fR \fIexpr\fR .br Interpret installables as attribute paths relative to the Nix expression \fIexpr\fR. .IP "\(bu" 2 \fC--file\fR / \fC-f\fR \fIfile\fR .br Interpret installables as attribute paths relative to the Nix expression stored in \fIfile\fR. If \fIfile\fR is the character -, then a Nix expression will be read from standard input.