nix-install-package 1 Nix nix-install-package install a Nix Package file nix-install-package path url file Description The command nix-install-package interactively installs a Nix Package file (*.nixpkg), which is a small file that contains a store path to be installed along with the URL of a nix-push manifest. The Nix Package file is either file, or automatically downloaded from url if the switch is used. nix-install-package is used in one-click installs to download and install pre-built binary packages with all necessary dependencies. nix-install-package is intended to be associated with the MIME type application/nix-package in a web browser so that it is invoked automatically when you click on *.nixpkg files. When invoked, it restarts itself in a terminal window (since otherwise it would be invisible when run from a browser), asks the user to confirm whether to install the package, and if so downloads and installs the package into the user’s current profile. To obtain a window, nix-install-package tries to restart itself with xterm, konsole and gnome-terminal. Options Do not open a new terminal window and do not ask for confirmation. Install the package into the specified profile rather than the user’s current profile. Examples To install subversion-1.4.0.nixpkg into the user’s current profile, without any prompting: $ nix-install-package --non-interactive subversion-1.4.0.nixpkg To install the same package from some URL into a different profile: $ nix-install-package --non-interactive -p /nix/var/nix/profiles/eelco \ --url http://nix.cs.uu.nl/dist/nix/nixpkgs-0.10pre6622/pkgs/subversion-1.4.0-i686-linux.nixpkg Format of <literal>nixpkg</literal> files A Nix Package file consists of a single line with the following format: NIXPKG1 manifestURL name system drvPath outPath The elemens are as follows: NIXPKG1 The version of the Nix Package file. manifestURL The manifest to be pulled by nix-pull. The manifest must contain outPath. name The symbolic name and version of the package. system The platform identifier of the platform for which this binary package is intended. drvPath The path in the Nix store of the derivation from which outPath was built. Not currently used. outPath The path in the Nix store of the package. After nix-install-package has obtained the manifest from manifestURL, it performs a nix-env -i outPath to install the binary package. An example follows: NIXPKG1 http://.../nixpkgs-0.10pre6622/MANIFEST subversion-1.4.0 i686-darwin \ /nix/store/4kh60jkp...-subversion-1.4.0.drv \ /nix/store/nkw7wpgb...-subversion-1.4.0 (The line breaks (\) are for presentation purposes and not part of the actual file.)