nix-install-package1Nixnix-install-packageinstall a Nix Package filenix-install-packagepathurlfileDescriptionThe 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.OptionsDo 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.ExamplesTo install subversion-1.4.0.nixpkg into the
user’s current profile, without any prompting:
$ nix-install-package --non-interactive subversion-1.4.0.nixpkgTo 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.nixpkgFormat of nixpkg filesA Nix Package file consists of a single line with the following
format:
NIXPKG1 manifestURLnamesystemdrvPathoutPath
The elemens are as follows:
NIXPKG1The version of the Nix Package
file.manifestURLThe manifest to be pulled by
nix-pull. The manifest must contain
outPath.nameThe symbolic name and version of the
package.systemThe platform identifier of the platform for which
this binary package is intended.drvPathThe path in the Nix store of the derivation from
which outPath was built. Not currently
used.outPathThe path in the Nix store of the package. After
nix-install-package has obtained the manifest
from manifestURL, it performs a
nix-env -ioutPath
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.)