diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index e06fbf5cd3..23c663fbad 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -8,7 +8,8 @@ XSLTPROC = $(xsltproc) $(xmlflags) \ man1_MANS = nix-env.1 nix-build.1 nix-store.1 nix-instantiate.1 \ nix-collect-garbage.1 nix-push.1 nix-pull.1 \ - nix-prefetch-url.1 nix-channel.1 + nix-prefetch-url.1 nix-channel.1 \ + nix-pack-closure.1 nix-unpack-closure.1 FIGURES = figures/user-environments.png diff --git a/doc/manual/introduction.xml b/doc/manual/introduction.xml index 644e62e3c0..8080c80d7b 100644 --- a/doc/manual/introduction.xml +++ b/doc/manual/introduction.xml @@ -3,11 +3,6 @@ Introduction - - Nix is a system for the deployment of software. Software deployment is concerned with the creation, distribution, and management of software components (packages). Its main diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 5ca7f491fe..ea85a7da59 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -74,6 +74,14 @@ nix-prefetch-url +
+ nix-pack-closure + +
+
+ nix-unpack-closure + +
diff --git a/doc/manual/nix-pack-closure.xml b/doc/manual/nix-pack-closure.xml new file mode 100644 index 0000000000..20e39157ce --- /dev/null +++ b/doc/manual/nix-pack-closure.xml @@ -0,0 +1,64 @@ + + + + nix-pack-closure + pack the closure of a store path into a single file that + can be unpacked with + nix-unpack-closure + + + + + nix-pack-closure + paths + + + + +Description + +The command nix-pack-closure packs the +contents of the store paths paths and +all their dependencies into a single file, which +is written to standard output. (That is, it +serialises paths.) +The output can then be unpacked into the Nix store of another machine +using nix-unpack-closure. + +Together, nix-pack-closure and +nix-unpack-closure provide a quick and easy way to +deploy a package to a different machine. However, as the output of +nix-pack-closure tends to be rather large (since it +contains all dependencies), it’s not very efficient. +nix-push and nix-pull are more +efficient, but are also a bit more cumbersome to use. + + + + +Examples + +To copy some instance of Subversion with all its dependencies to +another machine: + + +$ nix-pack-closure /nix/store/hj232g1r...-subversion-1.3.0 > svn.closure + +Copy svn.closure to the remote machine, then on the remote machine do: +$ nix-unpack-closure < svn.closure + + + +Copy the program azureus with all its +dependencies to the machine scratchy: + + +$ nix-pack-closure $(which azureus) | ssh scratchy nix-unpack-closure + + + + + + + diff --git a/doc/manual/nix-unpack-closure.xml b/doc/manual/nix-unpack-closure.xml new file mode 100644 index 0000000000..7c6d12d089 --- /dev/null +++ b/doc/manual/nix-unpack-closure.xml @@ -0,0 +1,28 @@ + + + + nix-unpack-closure + unpack the closure of a store path created by nix-pack-closure into the Nix store + + + + + nix-unpack-closure + + + + +Description + +The command nix-unpack-closure unpacks the +closure of a set of store paths created by +nix-pack-closure into the local Nix store. The +closure is a single file read from standard input. See the +description of nix-pack-closure for details and +examples. + + + + + diff --git a/doc/manual/quick-start.xml b/doc/manual/quick-start.xml index f520522dbe..a89ac93360 100644 --- a/doc/manual/quick-start.xml +++ b/doc/manual/quick-start.xml @@ -31,7 +31,8 @@ file).
Subscribe to the Nix Packages channel. -$ nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable +$ nix-channel --add \ + http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable @@ -49,7 +50,7 @@ available remotely. available in the channel: -$ nix-env -qa +$ nix-env -qa ’*’ (mind the quotes!) docbook-xml-4.2 firefox-1.0pre-PR-0.10.1 hello-2.1.1 @@ -109,13 +110,15 @@ to get rid of unused packages, since uninstalls or upgrades don't actually delete them: -$ nix-env --delete-generations old -$ nix-store --gc +$ nix-collect-garbage -d + + +