From d938a58beefc669ab340aa1aeab49df3dc24d123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 15 Mar 2017 22:14:36 +0100 Subject: gexp: Add '=>' syntax to import computed modules. * guix/gexp.scm (imported-files)[file-pair]: Add case for pairs where the cdr is not a string. (imported-modules): Support '=>' syntax in MODULES. * tests/gexp.scm ("imported-files with file-like objects") ("gexp->derivation & with-imported-module & computed module"): New tests. * doc/guix.texi (G-Expressions): Document '=>' syntax for 'with-imported-modules'. --- doc/guix.texi | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 78bf03de9e..2e70848e55 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4347,8 +4347,22 @@ of the @code{gexp?} type (see below.) @deffn {Scheme Syntax} with-imported-modules @var{modules} @var{body}@dots{} Mark the gexps defined in @var{body}@dots{} as requiring @var{modules} -in their execution environment. @var{modules} must be a list of Guile -module names, such as @code{'((guix build utils) (guix build gremlin))}. +in their execution environment. + +Each item in @var{modules} can be the name of a module, such as +@code{(guix build utils)}, or it can be a module name, followed by an +arrow, followed by a file-like object: + +@example +`((guix build utils) + (guix gcrypt) + ((guix config) => ,(scheme-file "config.scm" + #~(define-module @dots{})))) +@end example + +@noindent +In the example above, the first two modules are taken from the search +path, and the last one is created from the given file-like object. This form has @emph{lexical} scope: it has an effect on the gexps directly defined in @var{body}@dots{}, but not on those defined, say, in -- cgit v1.2.3 From 34d60c49cbffcee2bdaec32f0bfe2fef1c1ea8e6 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 20 Feb 2017 16:25:44 +0100 Subject: services: connman: Rework service. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/networking.scm (connman-service): Remove. (): New record specifying the package to be used (connman) and whether vpn plugin shall be disabled (disable-vpn?). (connman-configuration): New exported variable. (connman-configuration?): New exported variable. (connman-service-type): Export it. * doc/guix.texi (Networking Services): Adjust accordingly. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 2e70848e55..3382ac414e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9263,16 +9263,34 @@ NetworkManager will not modify @code{resolv.conf}. @end deftp @cindex Connman -@deffn {Scheme Procedure} connman-service @ - [#:connman @var{connman}] -Return a service that runs @url{https://01.org/connman,Connman}, a network -connection manager. - -This service adds the @var{connman} package to the global profile, providing -several the @command{connmanctl} command to interact with the daemon and -configure networking." +@deffn {Scheme Variable} connman-service-type +This is the service type to run @url{https://01.org/connman,Connman}, +a network connection manager. + +Its value must be an +@code{connman-configuration} record as in this example: + +@example +(service connman-service-type + (connman-configuration + (disable-vpn? #t))) +@end example + +See below for details about @code{connman-configuration}. @end deffn +@deftp {Data Type} connman-configuration +Data Type representing the configuration of connman. + +@table @asis +@item @code{connman} (default: @var{connman}) +The connman package to use. + +@item @code{disable-vpn?} (default: @code{#f}) +When true, enable connman's vpn plugin. +@end table +@end deftp + @cindex WPA Supplicant @defvr {Scheme Variable} wpa-supplicant-service-type This is the service type to run @url{https://w1.fi/wpa_supplicant/,WPA -- cgit v1.2.3 From b1edfbc37f2f008188d91f594b046c5986485e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Mar 2017 18:02:59 +0100 Subject: pack: Add '--format' option and Docker output support. * guix/docker.scm: Remove dependency on (guix store) and (guix utils). Use (guix build store-copy). Load (json) lazily. (build-docker-image): Remove #:system. Add #:closure, #:compressor, and 'image' parameters. Use 'uname' to determine the architecture. Remove use of 'call-with-temporary-directory'. Use 'read-reference-graph' to compute ITEMS. Honor #:compressor. * guix/scripts/pack.scm (docker-image): New procedure. (%default-options): Add 'format'. (%formats): New variable. (%options, show-help): Add '--format'. (guix-pack): Honor '--format'. * guix/scripts/archive.scm: Remove '--format' option. This reverts commits 1545a012cb7cd78e25ed99ecee26df457be590e9, 01445711db6771cea6122859c3f717f130359f55, and 03476a23ff2d4175b7d3c808726178f764359bec. * doc/guix.texi (Invoking guix pack): Document '--format'. (Invoking guix archive): Remove documentation of '--format'. --- doc/guix.texi | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 3382ac414e..45d171c52d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2435,6 +2435,22 @@ guix pack -S /opt/gnu/bin=bin guile emacs geiser @noindent That way, users can happily type @file{/opt/gnu/bin/guile} and enjoy. +Alternatively, you can produce a pack in the Docker image format, as +described in +@uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md, +version 1.2 of the specification}. This is what the following command +does: + +@example +guix pack -f docker guile emacs geiser +@end example + +@noindent +The result is a tarball that can be passed to the @command{docker load} +command. See the +@uref{https://docs.docker.com/engine/reference/commandline/load/, Docker +documentation} for more information. + Several command-line options allow you to customize your pack: @table @code @@ -2537,7 +2553,7 @@ what you should use in this case (@pxref{Invoking guix copy}). @cindex nar, archive format @cindex normalized archive (nar) -By default archives are stored in the ``normalized archive'' or ``nar'' format, which is +Archives are stored in the ``normalized archive'' or ``nar'' format, which is comparable in spirit to `tar', but with differences that make it more appropriate for our purposes. First, rather than recording all Unix metadata for each file, the nar format only mentions @@ -2553,9 +2569,6 @@ verifies the signature and rejects the import in case of an invalid signature or if the signing key is not authorized. @c FIXME: Add xref to daemon doc about signatures. -Optionally, archives can be exported as a Docker image in the tar -archive format using @code{--format=docker}. - The main options are: @table @code @@ -2584,19 +2597,6 @@ Read a list of store file names from the standard input, one per line, and write on the standard output the subset of these files missing from the store. -@item -f -@item --format=@var{FMT} -@cindex docker, export -@cindex export format -Specify the export format. Acceptable arguments are @code{nar} and -@code{docker}. The default is the nar format. When the format is -@code{docker}, recursively export the specified store directory as a -Docker image in tar archive format, as specified in -@uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md, -version 1.2.0 of the Docker Image Specification}. Using -@code{--format=docker} implies @code{--recursive}. The generated -archive can be loaded by Docker using @command{docker load}. - @item --generate-key[=@var{parameters}] @cindex signing, archives Generate a new key pair for the daemon. This is a prerequisite before -- cgit v1.2.3 From 107b8da6228fca888a0801c3eadf4bb23a6b46a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Mar 2017 22:59:33 +0100 Subject: doc: Mention 'guix pack' reproducibility. * doc/guix.texi (Invoking guix pack): Mention reproducibility. --- doc/guix.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 45d171c52d..bdbfedfdb5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2405,7 +2405,9 @@ The @command{guix pack} command creates a shrink-wrapped @dfn{pack} or containing the binaries of the software you're interested in, and all its dependencies. The resulting archive can be used on any machine that does not have Guix, and people can run the exact same binaries as those -you have with Guix. +you have with Guix. The pack itself is created in a bit-reproducible +fashion, so anyone can verify that it really contains the build results +that you pretend to be shipping. For example, to create a bundle containing Guile, Emacs, Geiser, and all their dependencies, you can run: -- cgit v1.2.3 From ad172c4a767e9a88d8861a1bd979c3a140dfdb68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Mar 2017 23:03:40 +0100 Subject: doc: Reorganize categories. * doc/guix.texi: Move "guix build" to the "Software Development" category; add "guix pack". --- doc/guix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index bdbfedfdb5..93640dfba5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47,7 +47,6 @@ Documentation License''. @direntry * Guix: (guix). Manage installed software and system configuration. * guix package: (guix)Invoking guix package. Installing, removing, and upgrading packages. -* guix build: (guix)Invoking guix build. Building packages. * guix gc: (guix)Invoking guix gc. Reclaiming unused disk space. * guix pull: (guix)Invoking guix pull. Update the list of available packages. * guix system: (guix)Invoking guix system. Manage the operating system configuration. @@ -56,6 +55,8 @@ Documentation License''. @dircategory Software development @direntry * guix environment: (guix)Invoking guix environment. Building development environments with Guix. +* guix build: (guix)Invoking guix build. Building packages. +* guix pack: (guix)Invoking guix pack. Creating binary bundles. @end direntry @titlepage -- cgit v1.2.3 From 708b54a99252d3929b8062bc57167cc6d097a126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Mar 2017 09:44:08 +0100 Subject: doc: Really document 'guix pack --format'. * doc/guix.texi (Invoking guix pack): Properly document --format. --- doc/guix.texi | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 93640dfba5..3db6dad5f3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2438,11 +2438,8 @@ guix pack -S /opt/gnu/bin=bin guile emacs geiser @noindent That way, users can happily type @file{/opt/gnu/bin/guile} and enjoy. -Alternatively, you can produce a pack in the Docker image format, as -described in -@uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md, -version 1.2 of the specification}. This is what the following command -does: +Alternatively, you can produce a pack in the Docker image format using +the following command: @example guix pack -f docker guile emacs geiser @@ -2457,6 +2454,23 @@ documentation} for more information. Several command-line options allow you to customize your pack: @table @code +@item --format=@var{format} +@itemx -f @var{format} +Produce a pack in the given @var{format}. + +The available formats are: + +@table @code +@item tarball +This is the default format. It produces a tarball containing all the +specifies binaries and symlinks. + +@item docker +This produces a tarball that follows the +@uref{https://github.com/docker/docker/blob/master/image/spec/v1.2.md, +Docker Image Specification}. +@end table + @item --system=@var{system} @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of -- cgit v1.2.3 From 5461115e8fd9a3181506307b6090716a0d5c202c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Mar 2017 22:45:32 +0100 Subject: pack: Add '--target'. * guix/scripts/pack.scm (self-contained-tarball): Add #:target. (docker-image): Add #:target. [build]: Pass it to 'build-docker-image'. (%options, show-help): Add '--target'. (guix-pack): Pass TARGET to 'profile-derivation' and to 'build-image'. * guix/docker.scm (build-docker-image): Add #:system parameter and honor it. * doc/guix.texi (Invoking guix pack): Document '--target'. (Additional Build Options): Refer to the Autoconf manual instead of the obsolete 'configure.info' for cross-compilation. --- doc/guix.texi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 3db6dad5f3..0a09bba06f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2476,6 +2476,12 @@ Docker Image Specification}. Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of the system type of the build host. +@item --target=@var{triplet} +@cindex cross-compilation +Cross-build for @var{triplet}, which must be a valid GNU triplet, such +as @code{"mips64el-linux-gnu"} (@pxref{Specifying target triplets, GNU +configuration triplets,, autoconf, Autoconf}). + @item --compression=@var{tool} @itemx -C @var{tool} Compress the resulting tarball using @var{tool}---one of @code{gzip}, @@ -5063,8 +5069,8 @@ to build packages in a complete 32-bit environment. @item --target=@var{triplet} @cindex cross-compilation Cross-build for @var{triplet}, which must be a valid GNU triplet, such -as @code{"mips64el-linux-gnu"} (@pxref{Configuration Names, GNU -configuration triplets,, configure, GNU Configure and Build System}). +as @code{"mips64el-linux-gnu"} (@pxref{Specifying target triplets, GNU +configuration triplets,, autoconf, Autoconf}). @anchor{build-check} @item --check -- cgit v1.2.3 From 36626c556ed75219bce196ac93d148f6b9af984c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Mar 2017 23:07:01 +0100 Subject: build: Require Guile >= 2.0.9. * configure.ac: Bump requirement to 2.0.9. * doc/guix.texi (Requirements): Adjust accordingly. * README (Requirements): Likewise. * build-aux/download.scm: Remove workaround for . * guix/build/download.scm: Likewise. (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/http-client.scm: Remove workaround for . (http-fetch)[post-2.0.7?]: Remove. Remove conditional code for not POST-2.0.7?. * guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9. * tests/nar.scm: Use (ice-9 control). (let/ec): Remove. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 0a09bba06f..944e1fad1b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -552,7 +552,7 @@ in the Guix source tree for additional details. GNU Guix depends on the following packages: @itemize -@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.7 or +@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.9 or later, including 2.2.x; @item @url{http://gnupg.org/, GNU libgcrypt}; @item -- cgit v1.2.3 From 7f608a9b45fc3d0dd209268150ef94cbd45da8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 17 Mar 2017 23:52:06 +0100 Subject: doc: Make "Application Setup" slightly more visible. Suggested by Arne Babenhauserheide. * doc/guix.texi (Binary Installation): Make the "Application Setup" reference an 8th item in the list. --- doc/guix.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 944e1fad1b..7eaef06cfb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -506,11 +506,13 @@ To use substitutes from @code{hydra.gnu.org} or one of its mirrors @example # guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub @end example + +@item +Each user may need to perform a few additional steps to make their Guix +environment ready for use, @pxref{Application Setup}. @end enumerate -This completes root-level install of Guix. Each user will need to -perform additional steps to make their Guix environment ready for use, -@pxref{Application Setup}. +Voilà, the installation is complete! You can confirm that Guix is working by installing a sample package into the root profile: -- cgit v1.2.3 From da31b9c7f636ad22e12f001350d8835477626405 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 17 Mar 2017 22:03:36 +0100 Subject: doc: Fix examples. To "spawns a Guile REPL", --ad-hoc is required. * doc/guix.texi (Invoking guix environment): Add "--ad-hoc" to container examples. --- doc/guix.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 7eaef06cfb..f38374385e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6404,7 +6404,7 @@ home directory is accessible read-only via the @file{/exchange} directory: @example -guix environment --container --expose=$HOME=/exchange guile -- guile +guix environment --container --expose=$HOME=/exchange --ad-hoc guile -- guile @end example @item --share=@var{source}[=@var{target}] @@ -6418,7 +6418,7 @@ home directory is accessible for both reading and writing via the @file{/exchange} directory: @example -guix environment --container --share=$HOME=/exchange guile -- guile +guix environment --container --share=$HOME=/exchange --ad-hoc guile -- guile @end example @end table -- cgit v1.2.3 From fdcb04afcc72b7e1512a046d803f406b98678b25 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 17 Mar 2017 22:05:33 +0100 Subject: doc: Clarify reference. * doc/guix.texi (Invoking guix environment): Explicitly name "guix environment". --- doc/guix.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index f38374385e..50e7944004 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6422,9 +6422,11 @@ guix environment --container --share=$HOME=/exchange --ad-hoc guile -- guile @end example @end table -It also supports all of the common build options that @command{guix +@command{guix environment} +also supports all of the common build options that @command{guix build} supports (@pxref{Common Build Options}). + @node Invoking guix publish @section Invoking @command{guix publish} -- cgit v1.2.3 From f6396d862f9f8ce0c0e6894ce30599773167af0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 19 Mar 2017 17:30:44 +0100 Subject: gnu: Rename "guile-next" to "guile". * gnu/packages/guile.scm (guile-next): Rename to... (guile-2.2): ... this. Update users. [name]: Change to "guile". [synopsis]: Remove. [properties]: Remove 'upstream-name', 'ftp-server', and 'ftp-directory'. * gnu/packages/bioinformatics.scm (rcas-web): Update accordingly. * gnu/packages/tls.scm (gnutls/guile-2.2): Likewise. * tests/guix-build.sh: Use 'guile@2.2' instead of 'guile-next'. * doc/guix.texi (Package Transformation Options): Update examples that referred to "guile-next". --- doc/guix.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 50e7944004..297141288c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4921,15 +4921,15 @@ or @code{guile@@1.8}. For instance, the following command builds Guix, but replaces its dependency on the current stable version of Guile with a dependency on -the development version of Guile, @code{guile-next}: +the legacy version of Guile, @code{guile@@2.0}: @example -guix build --with-input=guile=guile-next guix +guix build --with-input=guile=guile@@2.0 guix @end example This is a recursive, deep replacement. So in this example, both @code{guix} and its dependency @code{guile-json} (which also depends on -@code{guile}) get rebuilt against @code{guile-next}. +@code{guile}) get rebuilt against @code{guile@@2.0}. This is implemented using the @code{package-input-rewriting} Scheme procedure (@pxref{Defining Packages, @code{package-input-rewriting}}). -- cgit v1.2.3