From 8b3dc5cf0e129fc61b6eaa711897f61afc0fe45a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 3 Feb 2020 09:22:26 +0100 Subject: doc: Fix typo in channel example. * doc/guix.texi (Channels): Use 'commit' field instead of 'branch' in example. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 956c25ba9e..57e4846013 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4158,7 +4158,7 @@ say, on another machine, by providing a channel specification in (channel (name 'my-personal-packages) (url "https://example.org/personal-packages.git") - (branch "dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb"))) + (commit "dd3df5e2c8818760a8fc0bd699e55d3b69fef2bb"))) @end lisp The @command{guix describe --format=channels} command can even generate this -- cgit 1.4.1 From 65e15bd902f4dd6a3a1f6a87882ba73fac44defa Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 3 Feb 2020 19:30:34 +0100 Subject: doc: Improve "guix pack -f docker" example. * doc/guix.texi (Invoking guix pack): Provide more concrete instructions for the "guix pack -f docker" example. --- doc/guix.texi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 57e4846013..f90a8d4514 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5057,12 +5057,21 @@ Alternatively, you can produce a pack in the Docker image format using the following command: @example -guix pack -f docker guile emacs geiser +guix pack -f docker -S /bin=bin guile guile-readline @end example @noindent The result is a tarball that can be passed to the @command{docker load} -command. See the +command, followed by @code{docker run}: + +@example +docker load < @var{file} +docker run -ti guile-guile-readline /bin/guile +@end example + +@noindent +where @var{file} is the image returned by @var{guix pack}, and +@code{guile-guile-readline} is its ``image tag''. See the @uref{https://docs.docker.com/engine/reference/commandline/load/, Docker documentation} for more information. -- cgit 1.4.1 From ea9cc4ef219e62de569945816a5e666775e7fa41 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 4 Feb 2020 15:13:06 +0100 Subject: doc: Clarify documentation of Substitute Server Authorization. * doc/guix.texi (Substitute Server Authorization): Highlight the salient part of the example. Signed-off-by: Leo Famulari --- doc/guix.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index f90a8d4514..710cf97673 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3292,8 +3292,10 @@ $ guix build emacs --dry-run @end example @noindent -This indicates that substitutes from @code{@value{SUBSTITUTE-SERVER}} are usable and -will be downloaded, when possible, for future builds. +The text changed from ``The following derivations would be built'' to +``112.3 MB would be downloaded''. This indicates that substitutes from +@code{@value{SUBSTITUTE-SERVER}} are usable and will be downloaded, when +possible, for future builds. @cindex substitutes, how to disable The substitute mechanism can be disabled globally by running -- cgit 1.4.1 From 3c32ef7ae1eca7a821b5d6bcffb6f04263fa5b75 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 7 Feb 2020 18:30:39 -0500 Subject: doc: Add missing copyright notice for Damien Cassou. This is a followup to commit ea9cc4ef219e62de569945816a5e666775e7fa41. * doc/guix.texi: Add copyright line. --- doc/guix.texi | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 710cf97673..56cc333fe4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -72,6 +72,7 @@ Copyright @copyright{} 2019 Guillaume Le Vaillant@* Copyright @copyright{} 2020 Leo Prikler@* Copyright @copyright{} 2019, 2020 Simon Tournier@* Copyright @copyright{} 2020 Wiktor Żelazny@* +Copyright @copyright{} 2020 Damien Cassou@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or -- cgit 1.4.1 From 11415d35064cdba5cec1139aede18099cfa14547 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 5 Feb 2020 18:47:31 +0100 Subject: guix build: Add '--manifest' option. * guix/scripts/build.scm (show-help): Document --manifest argument. (options->things-to-build): When given a manifest, evaluate all the entries. * tests/guix-build.sh: Add test for --manifest. * doc/guix.texi (Additional Build Options): Mention --manifest. * etc/completion/bash/guix: Complete file name if 'guix build' argument is -m. --- doc/guix.texi | 7 ++++++- etc/completion/bash/guix | 2 +- guix/scripts/build.scm | 19 +++++++++++++++++++ tests/guix-build.sh | 9 +++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 42d7cfa2e8..282f9578bf 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46,7 +46,7 @@ Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* Copyright @copyright{} 2017 Thomas Danckaert@* Copyright @copyright{} 2017 humanitiesNerd@* Copyright @copyright{} 2017 Christopher Allan Webber@* -Copyright @copyright{} 2017, 2018, 2019 Marius Bakke@* +Copyright @copyright{} 2017, 2018, 2019, 2020 Marius Bakke@* Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@* Copyright @copyright{} 2017, 2019, 2020 Maxim Cournoyer@* Copyright @copyright{} 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice@* @@ -8456,6 +8456,11 @@ As an example, @var{file} might contain a package definition like this @include package-hello.scm @end lisp +@item --manifest=@var{manifest} +@itemx -m @var{manifest} +Build all packages listed in the given @var{manifest} +(@pxref{profile-manifest, @option{--manifest}}). + @item --expression=@var{expr} @itemx -e @var{expr} Build the package or derivation @var{expr} evaluates to. diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index edfb627e87..0333bfc8a2 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -178,7 +178,7 @@ _guix_complete () _guix_complete_installed_package "$word_at_point" elif _guix_is_command "build" then - if _guix_is_dash_L + if _guix_is_dash_L || _guix_is_dash_m then _guix_complete_file else diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index f054fc2bce..eedf6bf6a8 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2013 Mark H Weaver +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ #:use-module (guix monads) #:use-module (guix gexp) + #:use-module (guix profiles) #:autoload (guix http-client) (http-fetch http-get-error?) #:use-module (ice-9 format) #:use-module (ice-9 match) @@ -680,6 +682,9 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) -f, --file=FILE build the package or derivation that the code within FILE evaluates to")) (display (G_ " + -m, --manifest=FILE build the packages that the manifest given in FILE + evaluates to")) + (display (G_ " -S, --source build the packages' source derivations")) (display (G_ " --sources[=TYPE] build source derivations; TYPE may optionally be one @@ -768,6 +773,9 @@ must be one of 'package', 'all', or 'transitive'~%") (option '(#\f "file") #t #f (lambda (opt name arg result) (alist-cons 'file arg result))) + (option '(#\m "manifest") #t #f + (lambda (opt name arg result) + (alist-cons 'manifest arg result))) (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t (alist-cons 'graft? #f result)))) @@ -804,6 +812,14 @@ build---packages, gexps, derivations, and so on." (for-each validate-type lst) lst)) + ;; Note: Taken from (guix scripts refresh). + (define (manifest->packages manifest) + "Return the list of packages in MANIFEST." + (filter-map (lambda (entry) + (let ((item (manifest-entry-item entry))) + (if (package? item) item #f))) + (manifest-entries manifest))) + (append-map (match-lambda (('argument . (? string? spec)) (cond ((derivation-path? spec) @@ -827,6 +843,9 @@ build---packages, gexps, derivations, and so on." (list (specification->package spec))))) (('file . file) (ensure-list (load* file (make-user-module '())))) + (('manifest . manifest) + (manifest->packages + (load* manifest (make-user-module '((guix profiles) (gnu)))))) (('expression . str) (ensure-list (read/eval str))) (('argument . (? derivation? drv)) diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 21b6af4395..c1df6db3a4 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019 Ludovic Courtès +# Copyright © 2020 Marius Bakke # # This file is part of GNU Guix. # @@ -308,6 +309,14 @@ cat > "$module_dir/gexp.scm"< "$module_dir/manifest.scm"<manifest '("hello" "guix")) +EOF +test `guix build -d --manifest="$module_dir/manifest.scm" \ + | grep -e '-hello-' -e '-guix-' \ + | wc -l` -eq 2 rm "$module_dir"/*.scm # Using 'GUIX_BUILD_OPTIONS'. -- cgit 1.4.1