From 96d3534a9ed0d93c5e819543692933e50f246982 Mon Sep 17 00:00:00 2001 From: "Scott R. Parish" Date: Sun, 17 Apr 2016 15:25:48 -0700 Subject: fix "nix-build" examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing "nix-build" examples were failing: error: cannot auto-call a function that has an argument without a default value (‘system’) Thanks to @groxxda on irc for pointing out the fix! Updated to completely remove unneeded path argument, suggested by @joachifm Updated to remove other occurences of `all-packages.nix` from files as suggested by @domenkozar --- doc/manual/expressions/simple-building-testing.xml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'doc/manual') diff --git a/doc/manual/expressions/simple-building-testing.xml b/doc/manual/expressions/simple-building-testing.xml index e0dd98b7e67e..bd3901a13351 100644 --- a/doc/manual/expressions/simple-building-testing.xml +++ b/doc/manual/expressions/simple-building-testing.xml @@ -7,15 +7,14 @@ Building and Testing You can now try to build Hello. Of course, you could do -nix-env -f pkgs/top-level/all-packages.nix -i hello, -but you may not want to install a possibly broken package just yet. -The best way to test the package is by using the command nix-build, which builds a Nix -expression and creates a symlink named result in -the current directory: +nix-env -i hello, but you may not want to install a +possibly broken package just yet. The best way to test the package is by +using the command nix-build, +which builds a Nix expression and creates a symlink named +result in the current directory: -$ nix-build pkgs/top-level/all-packages.nix -A hello +$ nix-build -A hello building path `/nix/store/632d2b22514d...-hello-2.1.1' hello-2.1.1/ hello-2.1.1/intl/ @@ -29,8 +28,7 @@ $ ./result/bin/hello Hello, world! The option selects -the hello attribute from -all-packages.nix. This is faster than using the +the hello attribute. This is faster than using the symbolic package name specified by the name attribute (which also happens to be hello) and is unambiguous (there can be multiple packages with the symbolic name @@ -69,7 +67,7 @@ block (or perform other derivations if available) until the build finishes: -$ nix-build pkgs/top-level/all-packages.nix -A hello +$ nix-build -A hello waiting for lock on `/nix/store/0h5b7hp8d4hqfrw8igvx97x1xawrjnac-hello-2.1.1x' So it is always safe to run multiple instances of Nix in parallel -- cgit 1.4.1