From e2eed05224ed9bbc64014db9158bbc42bd3d9bef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 28 Sep 2006 09:10:53 +0000 Subject: [PATCH] * Manual updates. * Documented nix-{pack,unpack}-closure. --- doc/manual/Makefile.am | 3 +- doc/manual/introduction.xml | 5 --- doc/manual/manual.xml | 8 ++++ doc/manual/nix-pack-closure.xml | 64 +++++++++++++++++++++++++++++++ doc/manual/nix-unpack-closure.xml | 28 ++++++++++++++ doc/manual/quick-start.xml | 13 ++++--- 6 files changed, 110 insertions(+), 11 deletions(-) create mode 100644 doc/manual/nix-pack-closure.xml create mode 100644 doc/manual/nix-unpack-closure.xml diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index e06fbf5cd..23c663fba 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 644e62e3c..8080c80d7 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 5ca7f491f..ea85a7da5 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 000000000..20e39157c --- /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 000000000..7c6d12d08 --- /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 f520522db..a89ac9336 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 + + +