From 8a9fe6c11c4cf6ae9f3648ece844a8f392fc1cc0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 19 Sep 2007 14:01:41 +0000 Subject: [PATCH] * Manpage for nix-copy-closure. --- doc/manual/Makefile.am | 4 +- doc/manual/manual.xml | 21 +++- doc/manual/nix-build.xml | 10 +- doc/manual/nix-channel.xml | 10 +- doc/manual/nix-collect-garbage.xml | 10 +- doc/manual/nix-copy-closure.xml | 151 +++++++++++++++++++++++++++++ doc/manual/nix-env.xml | 10 +- doc/manual/nix-hash.xml | 10 +- doc/manual/nix-install-package.xml | 10 +- doc/manual/nix-instantiate.xml | 10 +- doc/manual/nix-pack-closure.xml | 10 +- doc/manual/nix-prefetch-url.xml | 10 +- doc/manual/nix-pull.xml | 10 +- doc/manual/nix-push.xml | 10 +- doc/manual/nix-store.xml | 10 +- doc/manual/nix-unpack-closure.xml | 10 +- doc/manual/release-notes.xml | 27 +++++- 17 files changed, 308 insertions(+), 25 deletions(-) create mode 100644 doc/manual/nix-copy-closure.xml diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 9c2e308dad..b9a6b6184b 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -15,7 +15,7 @@ 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-pack-closure.1 nix-unpack-closure.1 \ - nix-install-package.1 nix-hash.1 + nix-install-package.1 nix-hash.1 nix-copy-closure.1 FIGURES = figures/user-environments.png @@ -31,7 +31,7 @@ MANUAL_SRCS = manual.xml introduction.xml installation.xml \ manual.is-valid: $(MANUAL_SRCS) version.txt # $(XMLLINT) --xinclude $< | $(XMLLINT) --noout --nonet --relaxng $(docbookrng)/docbook.rng - if test "$(jing)" != "false"; then \ - $(XMLLINT) --xinclude $< | $(jing) $(docbookrng)/docbook.rng /dev/stdin; \ + $(XMLLINT) --xinclude $< | $(jing) $(docbookrng)/docbook.rng /dev/fd/0; \ else \ echo "Not validating."; \ fi diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 35b4417f10..a5a2902a7c 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -13,14 +13,21 @@ Eelco Dolstra + + Utrecht University + Faculty of Science, Department of Information and Computing Sciences + 2004 2005 2006 + 2007 Eelco Dolstra + + September 2007 @@ -49,7 +56,7 @@ nix-instantiate -
+
nix-store
@@ -65,10 +72,14 @@ nix-channel
-
+
nix-collect-garbage
+
+ nix-copy-closure + +
nix-hash @@ -77,11 +88,11 @@ nix-install-package
-
+
nix-pack-closure
-
+
nix-prefetch-url
@@ -93,7 +104,7 @@ nix-push
-
+
nix-unpack-closure
diff --git a/doc/manual/nix-build.xml b/doc/manual/nix-build.xml index 541275c523..3f35f5de39 100644 --- a/doc/manual/nix-build.xml +++ b/doc/manual/nix-build.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-build + 1 + Nix + + nix-build diff --git a/doc/manual/nix-channel.xml b/doc/manual/nix-channel.xml index f3fb7c1f6d..8ee4a5f274 100644 --- a/doc/manual/nix-channel.xml +++ b/doc/manual/nix-channel.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-channel + 1 + Nix + + + nix-channel manage Nix channels diff --git a/doc/manual/nix-collect-garbage.xml b/doc/manual/nix-collect-garbage.xml index 9dd9b664d9..53cffe2ffd 100644 --- a/doc/manual/nix-collect-garbage.xml +++ b/doc/manual/nix-collect-garbage.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-collect-garbage + 1 + Nix + + + nix-collect-garbage delete unreachable store paths diff --git a/doc/manual/nix-copy-closure.xml b/doc/manual/nix-copy-closure.xml new file mode 100644 index 0000000000..fcb6be2343 --- /dev/null +++ b/doc/manual/nix-copy-closure.xml @@ -0,0 +1,151 @@ + + + + nix-copy-closure + 1 + Nix + + + + + nix-copy-closure + copy a closure to or from a remote machine via SSH + + + + + nix-copy-closure + + + + + + + + user@machine + + paths + + + + +Description + +nix-copy-closure gives you an easy and +efficient way to exchange software between machines. Given one or +more Nix store paths paths on the local +machine, nix-copy-closure computes the closure of +those paths (i.e. all their dependencies in the Nix store), and copies +all paths in the closure to the remote machine via the +ssh (Secure Shell) command. With the +, the direction is reversed: +the closure of paths on a remote machine is +copied to the Nix store on the local machine. + +This command is efficient because it only sends the store paths +that are missing on the target machine. + +Since nix-copy-closure calls +ssh, you may be asked to type in the appropriate +password or passphrase. In fact, you may be asked +twice because nix-copy-closure +currently connects twice to the remote machine, first to get the set +of paths missing on the target machine, and second to send the dump of +those paths. If this bothers you, use +ssh-agent. + + +Options + + + + + + Copy the closure of + paths from the local Nix store to the + Nix store on machine. This is the + default. + + + + + + Copy the closure of + paths from the Nix store on + machine to the local Nix + store. + + + + + + Let the sending machine cryptographically sign the + dump of each path with the key in + /nix/etc/nix/signing-key.sec. If the user on + the target machine does not have direct access to the Nix store + (i.e., if the target machine has a multi-user Nix installation), + then the target machine will check the dump against + /nix/etc/nix/signing-key.pub before unpacking + it in its Nix store. This allows secure sharing of store paths + between untrusted users on two machines, provided that there is a + trust relation between the Nix installations on both machines + (namely, they have matching public/secret keys). + + + + + + Compress the dump of each path with + gzip before sending it. + + + + + + + + +Environment variables + + + + NIX_SSHOPTS + + Additional options to be passed to + ssh on the command line. + + + + + + + + +Examples + +Copy Firefox with all its dependencies to a remote machine: + + +$ nix-copy-closure alice@itchy.labs $(type -tP firefox) + + + +Copy Subversion from a remote machine and then install it into a +user environment: + + +$ nix-copy-closure --from alice@itchy.labs \ + /nix/store/0dj0503hjxy5mbwlafv1rsbdiyx1gkdy-subversion-1.4.4 +$ nix-env -i /nix/store/0dj0503hjxy5mbwlafv1rsbdiyx1gkdy-subversion-1.4.4 + + + + + + + + + + diff --git a/doc/manual/nix-env.xml b/doc/manual/nix-env.xml index 9c9114a901..9b91279211 100644 --- a/doc/manual/nix-env.xml +++ b/doc/manual/nix-env.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-env + 1 + Nix + + + nix-env manipulate or query Nix user environments diff --git a/doc/manual/nix-hash.xml b/doc/manual/nix-hash.xml index 227eb94217..dcf01d3a2c 100644 --- a/doc/manual/nix-hash.xml +++ b/doc/manual/nix-hash.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-hash + 1 + Nix + + + nix-hash compute the cryptographic hash of a path diff --git a/doc/manual/nix-install-package.xml b/doc/manual/nix-install-package.xml index 5e4f03d734..f0eab5df87 100644 --- a/doc/manual/nix-install-package.xml +++ b/doc/manual/nix-install-package.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-install-package + 1 + Nix + + + nix-install-package install a Nix Package file diff --git a/doc/manual/nix-instantiate.xml b/doc/manual/nix-instantiate.xml index 24d4c45d32..d61d6d59de 100644 --- a/doc/manual/nix-instantiate.xml +++ b/doc/manual/nix-instantiate.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-instantiate + 1 + Nix + + + nix-instantiate instantiate store derivations from Nix expressions diff --git a/doc/manual/nix-pack-closure.xml b/doc/manual/nix-pack-closure.xml index 8f79a4f690..c11dacd26f 100644 --- a/doc/manual/nix-pack-closure.xml +++ b/doc/manual/nix-pack-closure.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-pack-closure + 1 + Nix + + nix-pack-closure diff --git a/doc/manual/nix-prefetch-url.xml b/doc/manual/nix-prefetch-url.xml index b03169376e..777bbe140b 100644 --- a/doc/manual/nix-prefetch-url.xml +++ b/doc/manual/nix-prefetch-url.xml @@ -1,6 +1,14 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + nix-prefetch-url + 1 + Nix + + + nix-prefetch-url copy a file from a URL into the store and print its MD5 hash diff --git a/doc/manual/nix-pull.xml b/doc/manual/nix-pull.xml index 28b5e354bb..37ca88fcce 100644 --- a/doc/manual/nix-pull.xml +++ b/doc/manual/nix-pull.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-pull + 1 + Nix + + nix-pull diff --git a/doc/manual/nix-push.xml b/doc/manual/nix-push.xml index d58350e2d9..f439af563d 100644 --- a/doc/manual/nix-push.xml +++ b/doc/manual/nix-push.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-push + 1 + Nix + + nix-push diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index d787c337be..a168be024d 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-store + 1 + Nix + + nix-store diff --git a/doc/manual/nix-unpack-closure.xml b/doc/manual/nix-unpack-closure.xml index e95225e819..dce0d1db43 100644 --- a/doc/manual/nix-unpack-closure.xml +++ b/doc/manual/nix-unpack-closure.xml @@ -1,5 +1,13 @@ + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + + nix-unpack-closure + 1 + Nix + + nix-unpack-closure diff --git a/doc/manual/release-notes.xml b/doc/manual/release-notes.xml index c3bc060cb1..b19d9a3823 100644 --- a/doc/manual/release-notes.xml +++ b/doc/manual/release-notes.xml @@ -1,5 +1,6 @@
+ xmlns:xlink="http://www.w3.org/1999/xlink" + xml:id="sec-relnotes"> Nix Release Notes @@ -7,7 +8,7 @@ -
Release 0.11 (TBA) +
Release 0.11 (TBA) @@ -17,9 +18,10 @@ removed. - nix-copy-closure copies the - missing parts of a closure to or from a remote - machine. + The new command nix-copy-closure + gives you an easy and efficient way to exchange software between + machines. It copies the missing parts of the closure of a set of + store path to or from a remote machine. nix-prefetch-url now by default @@ -99,6 +101,21 @@ builtins.sub, builtins.stringLength, builtins.substring. + + + TODO: each subscribed channel is its own attribute + in the top-level expression generated for the channel, this allows + disambiguation (nix-env -qaA). + + + TODO: substitutes table is gone, registering + substitutes is now much faster. + + + nix-prefetch-url now has a + limited form of caching. This is used by + nix-channel to prevent unnecessary downloads when + the channel hasn’t changed.