From 0212feeed66d2eb0a9365ca4d55cb2dad3bc4ade Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Sep 2006 14:16:41 +0000 Subject: [PATCH] * Document nix-install-package and the nixpkg file format. --- doc/manual/Makefile.am | 3 +- doc/manual/manual.xml | 48 ++++---- doc/manual/nix-install-package.xml | 192 +++++++++++++++++++++++++++++ doc/manual/package-management.xml | 2 +- doc/manual/style.css | 29 +++-- 5 files changed, 240 insertions(+), 34 deletions(-) create mode 100644 doc/manual/nix-install-package.xml diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index d06539f9b..ea8cb3e9a 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -10,7 +10,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-pack-closure.1 nix-unpack-closure.1 + nix-pack-closure.1 nix-unpack-closure.1 \ + nix-install-package.1 FIGURES = figures/user-environments.png diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index ea85a7da5..7c9f8b1d6 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -38,45 +38,49 @@ -
- nix-env - -
nix-build
-
- nix-store - -
-
- nix-instantiate - -
-
- nix-collect-garbage - -
nix-channel
- nix-push - + nix-collect-garbage + +
+
+ nix-env + +
+
+ nix-install-package + +
+
+ nix-instantiate +
- nix-pull - + nix-pack-closure +
nix-prefetch-url
- nix-pack-closure - + nix-pull + +
+
+ nix-push + +
+
+ nix-store +
nix-unpack-closure diff --git a/doc/manual/nix-install-package.xml b/doc/manual/nix-install-package.xml new file mode 100644 index 000000000..b696fa03f --- /dev/null +++ b/doc/manual/nix-install-package.xml @@ -0,0 +1,192 @@ + + + + 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.) + + + + + + + diff --git a/doc/manual/package-management.xml b/doc/manual/package-management.xml index f916d21f3..d796c7f2b 100644 --- a/doc/manual/package-management.xml +++ b/doc/manual/package-management.xml @@ -476,7 +476,7 @@ available in the subscribed channels.
-
One-click installations +
One-click installs TODO diff --git a/doc/manual/style.css b/doc/manual/style.css index 0598443ef..2d97b95e6 100644 --- a/doc/manual/style.css +++ b/doc/manual/style.css @@ -35,19 +35,15 @@ div.chapter > div.titlepage h2, div.appendix > div.titlepage h2 margin-top: 1.5em; } -div.sect1 h2 /* sections */ +div.section > div.titlepage h2 /* sections */ { font-size: 150%; -} - -/* Extra space between sections. */ -div.section > div.titlepage h2 -{ - margin-top: 1.2em; + margin-top: 1.5em; } div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */ { + margin-top: 1.4em; font-size: 125%; } @@ -73,7 +69,7 @@ div.example padding: 6px 6px; margin-left: 0em; margin-right: 0em; - background: #eeeeee; + background: #f4f4f8; } pre.programlisting @@ -94,7 +90,7 @@ pre.screen margin-left: 1.5em; margin-right: 1.5em; color: #600000; - background: #eeeeee; + background: #f4f4f8; font-family: monospace; /* font-size: 90%; */ } @@ -186,9 +182,14 @@ tt, code } +div.variablelist dd p +{ + margin-top: 0em; +} + div.variablelist dd { - margin-bottom: 1em; + margin-left: 1.5em; } .default @@ -251,3 +252,11 @@ table.productionset table.productionset { font-family: monospace; } + +strong.command +{ +// font-family: monospace; +// font-style: italic; +// font-weight: normal; + color: #400000; +} \ No newline at end of file