From d938a58beefc669ab340aa1aeab49df3dc24d123 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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') 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 +++++++++++++----- gnu/services/networking.scm | 86 ++++++++++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 45 deletions(-) (limited to 'doc') 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 diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 18bce2a2b8..9b8e5b36b1 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -80,7 +80,10 @@ network-manager-configuration-dns network-manager-service-type - connman-service + connman-configuration + connman-configuration? + connman-service-type + wpa-supplicant-service-type openvswitch-service-type @@ -822,45 +825,54 @@ dns=" dns " ;;; Connman ;;; -(define %connman-activation - ;; Activation gexp for Connman. - #~(begin - (use-modules (guix build utils)) - (mkdir-p "/var/lib/connman/") - (mkdir-p "/var/lib/connman-vpn/"))) - -(define (connman-shepherd-service connman) +(define-record-type* + connman-configuration make-connman-configuration + connman-configuration? + (connman connman-configuration-connman + (default connman)) + (disable-vpn? connman-configuration-disable-vpn? + (default #f))) + +(define (connman-activation config) + (let ((disable-vpn? (connman-configuration-disable-vpn? config))) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/lib/connman/") + (unless #$disable-vpn? + (mkdir-p "/var/lib/connman-vpn/")))))) + +(define (connman-shepherd-service config) "Return a shepherd service for Connman" - (list (shepherd-service - (documentation "Run Connman") - (provision '(networking)) - (requirement '(user-processes dbus-system loopback wpa-supplicant)) - (start #~(make-forkexec-constructor - (list (string-append #$connman - "/sbin/connmand") - "-n" "-r"))) - (stop #~(make-kill-destructor))))) + (and + (connman-configuration? config) + (let ((connman (connman-configuration-connman config)) + (disable-vpn? (connman-configuration-disable-vpn? config))) + (list (shepherd-service + (documentation "Run Connman") + (provision '(networking)) + (requirement + '(user-processes dbus-system loopback wpa-supplicant)) + (start #~(make-forkexec-constructor + (list (string-append #$connman + "/sbin/connmand") + "-n" "-r" + #$@(if disable-vpn? '("--noplugin=vpn") '())))) + (stop #~(make-kill-destructor))))))) (define connman-service-type - (service-type (name 'connman) - (extensions - (list (service-extension shepherd-root-service-type - connman-shepherd-service) - (service-extension dbus-root-service-type list) - (service-extension activation-service-type - (const %connman-activation)) - ;; Add connman to the system profile. - (service-extension profile-service-type list))))) - -(define* (connman-service #:key (connman 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." - (service connman-service-type connman)) - + (let ((connman-package (compose list connman-configuration-connman))) + (service-type (name 'connman) + (extensions + (list (service-extension shepherd-root-service-type + connman-shepherd-service) + (service-extension dbus-root-service-type + connman-package) + (service-extension activation-service-type + connman-activation) + ;; Add connman to the system profile. + (service-extension profile-service-type + connman-package)))))) ;;; -- cgit v1.2.3 From b1edfbc37f2f008188d91f594b046c5986485e47 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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 ++++++++-------- guix/docker.scm | 103 ++++++++++++++++++++++++++--------------------- guix/scripts/archive.scm | 31 ++------------ guix/scripts/pack.scm | 95 ++++++++++++++++++++++++++++++++++++++----- 4 files changed, 161 insertions(+), 102 deletions(-) (limited to 'doc') 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 diff --git a/guix/docker.scm b/guix/docker.scm index 6dabaf25b0..56a0f7ec2b 100644 --- a/guix/docker.scm +++ b/guix/docker.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,17 +19,18 @@ (define-module (guix docker) #:use-module (guix hash) - #:use-module (guix store) #:use-module (guix base16) - #:use-module (guix utils) #:use-module ((guix build utils) #:select (delete-file-recursively with-directory-excursion)) - #:use-module (json) + #:use-module (guix build store-copy) #:use-module (rnrs bytevectors) #:use-module (ice-9 match) #:export (build-docker-image)) +;; Load Guile-JSON at run time to simplify the job of 'imported-modules' & co. +(module-use! (current-module) (resolve-interface '(json))) + ;; Generate a 256-bit identifier in hexadecimal encoding for the Docker image ;; containing the closure at PATH. (define docker-id @@ -81,48 +83,55 @@ (rootfs . ((type . "layers") (diff_ids . (,(layer-diff-id layer))))))) -(define* (build-docker-image path #:key system) - "Generate a Docker image archive from the given store PATH. The image -contains the closure of the given store item." - (let ((id (docker-id path)) +(define* (build-docker-image image path #:key closure compressor) + "Write to IMAGE a Docker image archive from the given store PATH. The image +contains the closure of PATH, as specified in CLOSURE (a file produced by +#:references-graphs). Use COMPRESSOR, a command such as '(\"gzip\" \"-9n\"), +to compress IMAGE." + (let ((directory "/tmp/docker-image") ;temporary working directory + (closure (canonicalize-path closure)) + (id (docker-id path)) (time (strftime "%FT%TZ" (localtime (current-time)))) - (name (string-append (getcwd) - "/docker-image-" (basename path) ".tar")) - (arch (match system - ("x86_64-linux" "amd64") - ("i686-linux" "386") - ("armhf-linux" "arm") - ("mips64el-linux" "mips64le")))) - (and (call-with-temporary-directory - (lambda (directory) - (with-directory-excursion directory - ;; Add symlink from /bin to /gnu/store/.../bin - (symlink (string-append path "/bin") "bin") - - (mkdir id) - (with-directory-excursion id - (with-output-to-file "VERSION" - (lambda () (display schema-version))) - (with-output-to-file "json" - (lambda () (scm->json (image-description id time)))) - - ;; Wrap it up - (let ((items (with-store store - (requisites store (list path))))) - (and (zero? (apply system* "tar" "-cf" "layer.tar" - (cons "../bin" items))) - (delete-file "../bin")))) - - (with-output-to-file "config.json" - (lambda () - (scm->json (config (string-append id "/layer.tar") - time arch)))) - (with-output-to-file "manifest.json" - (lambda () - (scm->json (manifest path id)))) - (with-output-to-file "repositories" - (lambda () - (scm->json (repositories path id))))) - (and (zero? (system* "tar" "-C" directory "-cf" name ".")) - (begin (delete-file-recursively directory) #t)))) - name))) + (arch (match (utsname:machine (uname)) + ("x86_64" "amd64") + ("i686" "386") + ("armv7l" "arm") + ("mips64" "mips64le")))) + ;; Make sure we start with a fresh, empty working directory. + (mkdir directory) + + (and (with-directory-excursion directory + ;; Add symlink from /bin to /gnu/store/.../bin + (symlink (string-append path "/bin") "bin") + + (mkdir id) + (with-directory-excursion id + (with-output-to-file "VERSION" + (lambda () (display schema-version))) + (with-output-to-file "json" + (lambda () (scm->json (image-description id time)))) + + ;; Wrap it up + (let ((items (call-with-input-file closure + read-reference-graph))) + (and (zero? (apply system* "tar" "-cf" "layer.tar" + (cons "../bin" items))) + (delete-file "../bin")))) + + (with-output-to-file "config.json" + (lambda () + (scm->json (config (string-append id "/layer.tar") + time arch)))) + (with-output-to-file "manifest.json" + (lambda () + (scm->json (manifest path id)))) + (with-output-to-file "repositories" + (lambda () + (scm->json (repositories path id))))) + + (and (zero? (apply system* "tar" "-C" directory "-cf" image + `(,@(if compressor + (list "-I" (string-join compressor)) + '()) + "."))) + (begin (delete-file-recursively directory) #t))))) diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index cad279fb50..8137455a9d 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -1,6 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès -;;; Copyright © 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,11 +44,6 @@ #:export (guix-archive options->derivations+files)) -;; XXX: Use this hack instead of #:autoload to avoid compilation errors. -;; See . -(module-autoload! (current-module) - '(guix docker) '(build-docker-image)) - ;;; ;;; Command-line options. @@ -57,8 +51,7 @@ (define %default-options ;; Alist of default option values. - `((format . "nar") - (system . ,(%current-system)) + `((system . ,(%current-system)) (substitutes? . #t) (graft? . #t) (max-silent-time . 3600) @@ -69,8 +62,6 @@ Export/import one or more packages from/to the store.\n")) (display (_ " --export export the specified files/packages to stdout")) - (display (_ " - --format=FMT export files/packages in the specified format FMT")) (display (_ " -r, --recursive combined with '--export', include dependencies")) (display (_ " @@ -126,9 +117,6 @@ Export/import one or more packages from/to the store.\n")) (option '("export") #f #f (lambda (opt name arg result) (alist-cons 'export #t result))) - (option '(#\f "format") #t #f - (lambda (opt name arg result . rest) - (alist-cons 'format arg result))) (option '(#\r "recursive") #f #f (lambda (opt name arg result) (alist-cons 'export-recursive? #t result))) @@ -258,21 +246,8 @@ resulting archive to the standard output port." (if (or (assoc-ref opts 'dry-run?) (build-derivations store drv)) - (match (assoc-ref opts 'format) - ("nar" - (export-paths store files (current-output-port) - #:recursive? (assoc-ref opts 'export-recursive?))) - ("docker" - (match files - ((file) - (let ((system (assoc-ref opts 'system))) - (format #t "~a\n" - (build-docker-image file #:system system)))) - (x - ;; TODO: Remove this restriction. - (leave (_ "only a single item can be exported to Docker~%"))))) - (format - (leave (_ "~a: unknown archive format~%") format))) + (export-paths store files (current-output-port) + #:recursive? (assoc-ref opts 'export-recursive?)) (leave (_ "unable to export the given packages~%"))))) (define (generate-key-pair parameters) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index e422b3cdda..c6f2145c5c 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -24,6 +24,7 @@ #:use-module (guix store) #:use-module (guix grafts) #:use-module (guix monads) + #:use-module (guix modules) #:use-module (guix packages) #:use-module (guix profiles) #:use-module (guix derivations) @@ -32,6 +33,8 @@ #:use-module (gnu packages compression) #:autoload (gnu packages base) (tar) #:autoload (gnu packages package-management) (guix) + #:autoload (gnu packages gnupg) (libgcrypt) + #:autoload (gnu packages guile) (guile-json) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-37) @@ -177,6 +180,59 @@ added to the pack." build #:references-graphs `(("profile" ,profile)))) +(define* (docker-image name profile + #:key deduplicate? + (compressor (first %compressors)) + localstatedir? + (symlinks '()) + (tar tar)) + "Return a derivation to construct a Docker image of PROFILE. The +image is a tarball conforming to the Docker Image Specification, compressed +with COMPRESSOR. It can be passed to 'docker load'." + ;; FIXME: Honor SYMLINKS and LOCALSTATEDIR?. + (define not-config? + (match-lambda + (('guix 'config) #f) + (('guix rest ...) #t) + (('gnu rest ...) #t) + (rest #f))) + + (define config + ;; (guix config) module for consumption by (guix gcrypt). + (scheme-file "gcrypt-config.scm" + #~(begin + (define-module (guix config) + #:export (%libgcrypt)) + + ;; XXX: Work around . + (eval-when (expand load eval) + (define %libgcrypt + #+(file-append libgcrypt "/lib/libgcrypt")))))) + + (define build + (with-imported-modules `(,@(source-module-closure '((guix docker)) + #:select? not-config?) + ((guix config) => ,config)) + #~(begin + ;; Guile-JSON is required by (guix docker). + (add-to-load-path + (string-append #$guile-json "/share/guile/site/" + (effective-version))) + + (use-modules (guix docker)) + + (setenv "PATH" + (string-append #$tar "/bin:" + #$(compressor-package compressor) "/bin")) + + (build-docker-image #$output #$profile + #:closure "profile" + #:compressor '#$(compressor-command compressor))))) + + (gexp->derivation (string-append name ".tar." + (compressor-extension compressor)) + build + #:references-graphs `(("profile" ,profile)))) ;;; @@ -185,7 +241,8 @@ added to the pack." (define %default-options ;; Alist of default option values. - `((system . ,(%current-system)) + `((format . tarball) + (system . ,(%current-system)) (substitutes? . #t) (graft? . #t) (max-silent-time . 3600) @@ -193,6 +250,11 @@ added to the pack." (symlinks . ()) (compressor . ,(first %compressors)))) +(define %formats + ;; Supported pack formats. + `((tarball . ,self-contained-tarball) + (docker . ,docker-image))) + (define %options ;; Specifications of the command-line options. (cons* (option '(#\h "help") #f #f @@ -206,6 +268,9 @@ added to the pack." (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t (alist-cons 'graft? #f result)))) + (option '(#\f "format") #t #f + (lambda (opt name arg result) + (alist-cons 'format (string->symbol arg) result))) (option '(#\s "system") #t #f (lambda (opt name arg result) (alist-cons 'system arg @@ -242,6 +307,8 @@ Create a bundle of PACKAGE.\n")) (show-transformation-options-help) (newline) (display (_ " + -f, --format=FORMAT build a pack in the given FORMAT")) + (display (_ " -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) (display (_ " -C, --compression=TOOL compress using TOOL--e.g., \"lzip\"")) @@ -280,8 +347,16 @@ Create a bundle of PACKAGE.\n")) (specification->package+output spec)) list)) specs)) - (compressor (assoc-ref opts 'compressor)) - (symlinks (assoc-ref opts 'symlinks)) + (pack-format (assoc-ref opts 'format)) + (name (string-append (symbol->string pack-format) + "-pack")) + (compressor (assoc-ref opts 'compressor)) + (symlinks (assoc-ref opts 'symlinks)) + (build-image (match (assq-ref %formats pack-format) + ((? procedure? proc) proc) + (#f + (leave (_ "~a: unknown pack format") + format)))) (localstatedir? (assoc-ref opts 'localstatedir?))) (with-store store ;; Set the build options before we do anything else. @@ -290,13 +365,13 @@ Create a bundle of PACKAGE.\n")) (run-with-store store (mlet* %store-monad ((profile (profile-derivation (packages->manifest packages))) - (drv (self-contained-tarball "pack" profile - #:compressor - compressor - #:symlinks - symlinks - #:localstatedir? - localstatedir?))) + (drv (build-image name profile + #:compressor + compressor + #:symlinks + symlinks + #:localstatedir? + localstatedir?))) (mbegin %store-monad (show-what-to-build* (list drv) #:use-substitutes? -- cgit v1.2.3 From 107b8da6228fca888a0801c3eadf4bb23a6b46a4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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') 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: Ludovic Courtès 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') 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: Ludovic Courtès 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') 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: Ludovic Courtès 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 ++++++++-- guix/docker.scm | 21 +++++++++++++++------ guix/scripts/pack.scm | 23 +++++++++++++++++++---- 3 files changed, 42 insertions(+), 12 deletions(-) (limited to 'doc') 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 diff --git a/guix/docker.scm b/guix/docker.scm index 290ad3dcf1..060232148e 100644 --- a/guix/docker.scm +++ b/guix/docker.scm @@ -105,12 +105,14 @@ return \"a\"." (define* (build-docker-image image path #:key closure compressor (symlinks '()) + (system (utsname:machine (uname))) (creation-time (current-time time-utc))) "Write to IMAGE a Docker image archive from the given store PATH. The image contains the closure of PATH, as specified in CLOSURE (a file produced by #:references-graphs). SYMLINKS must be a list of (SOURCE -> TARGET) tuples describing symlinks to be created in the image, where each TARGET is relative -to PATH. +to PATH. SYSTEM is a GNU triplet (or prefix thereof) of the system the +binaries at PATH are for; it is used to produce metadata in the image. Use COMPRESSOR, a command such as '(\"gzip\" \"-9n\"), to compress IMAGE. Use CREATION-TIME, a SRFI-19 time-utc object, as the creation time in metadata." @@ -118,11 +120,18 @@ CREATION-TIME, a SRFI-19 time-utc object, as the creation time in metadata." (closure (canonicalize-path closure)) (id (docker-id path)) (time (date->string (time-utc->date creation-time) "~4")) - (arch (match (utsname:machine (uname)) - ("x86_64" "amd64") - ("i686" "386") - ("armv7l" "arm") - ("mips64" "mips64le")))) + (arch (let-syntax ((cond* (syntax-rules () + ((_ (pattern clause) ...) + (cond ((string-prefix? pattern system) + clause) + ... + (else + (error "unsupported system" + system))))))) + (cond* ("x86_64" "amd64") + ("i686" "386") + ("arm" "arm") + ("mips64" "mips64le"))))) ;; Make sure we start with a fresh, empty working directory. (mkdir directory) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index ce7613e4a0..626c592e1c 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -73,7 +73,8 @@ found." (leave (_ "~a: compressor not found~%") name))) (define* (self-contained-tarball name profile - #:key deduplicate? + #:key target + deduplicate? (compressor (first %compressors)) localstatedir? (symlinks '()) @@ -184,14 +185,17 @@ added to the pack." #:references-graphs `(("profile" ,profile)))) (define* (docker-image name profile - #:key deduplicate? + #:key target + deduplicate? (compressor (first %compressors)) localstatedir? (symlinks '()) (tar tar)) "Return a derivation to construct a Docker image of PROFILE. The image is a tarball conforming to the Docker Image Specification, compressed -with COMPRESSOR. It can be passed to 'docker load'." +with COMPRESSOR. It can be passed to 'docker load'. If TARGET is true, it +must a be a GNU triplet and it is used to derive the architecture metadata in +the image." ;; FIXME: Honor LOCALSTATEDIR?. (define not-config? (match-lambda @@ -227,6 +231,7 @@ with COMPRESSOR. It can be passed to 'docker load'." (setenv "PATH" (string-append #$tar "/bin")) (build-docker-image #$output #$profile + #:system (or #$target (utsname:machine (uname))) #:closure "profile" #:symlinks '#$symlinks #:compressor '#$(compressor-command compressor) @@ -278,6 +283,10 @@ with COMPRESSOR. It can be passed to 'docker load'." (lambda (opt name arg result) (alist-cons 'system arg (alist-delete 'system result eq?)))) + (option '("target") #t #f + (lambda (opt name arg result) + (alist-cons 'target arg + (alist-delete 'target result eq?)))) (option '(#\C "compression") #t #f (lambda (opt name arg result) (alist-cons 'compressor (lookup-compressor arg) @@ -314,6 +323,8 @@ Create a bundle of PACKAGE.\n")) -f, --format=FORMAT build a pack in the given FORMAT")) (display (_ " -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) + (display (_ " + --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) (display (_ " -C, --compression=TOOL compress using TOOL--e.g., \"lzip\"")) (display (_ " @@ -354,6 +365,7 @@ Create a bundle of PACKAGE.\n")) (pack-format (assoc-ref opts 'format)) (name (string-append (symbol->string pack-format) "-pack")) + (target (assoc-ref opts 'target)) (compressor (assoc-ref opts 'compressor)) (symlinks (assoc-ref opts 'symlinks)) (build-image (match (assq-ref %formats pack-format) @@ -368,8 +380,11 @@ Create a bundle of PACKAGE.\n")) (run-with-store store (mlet* %store-monad ((profile (profile-derivation - (packages->manifest packages))) + (packages->manifest packages) + #:target target)) (drv (build-image name profile + #:target + target #:compressor compressor #:symlinks -- cgit v1.2.3 From 36626c556ed75219bce196ac93d148f6b9af984c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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. --- README | 2 +- build-aux/download.scm | 5 ----- configure.ac | 2 +- doc/guix.texi | 2 +- guix/build/download.scm | 29 +++-------------------------- guix/http-client.scm | 15 +++------------ guix/serialization.scm | 3 +-- tests/nar.scm | 12 +----------- 8 files changed, 11 insertions(+), 59 deletions(-) (limited to 'doc') diff --git a/README b/README index 5829320dc7..4921f255da 100644 --- a/README +++ b/README @@ -20,7 +20,7 @@ Guix is based on the [[http://nixos.org/nix/][Nix]] package manager. GNU Guix currently depends on the following packages: - - [[http://gnu.org/software/guile/][GNU Guile 2.0.x]], version 2.0.7 or later + - [[http://gnu.org/software/guile/][GNU Guile 2.2.x or 2.0.x]], version 2.0.9 or later - [[http://gnupg.org/][GNU libgcrypt]] - [[http://www.gnu.org/software/make/][GNU Make]] - optionally [[http://savannah.nongnu.org/projects/guile-json/][Guile-JSON]], for the 'guix import pypi' command diff --git a/build-aux/download.scm b/build-aux/download.scm index 8f41f33b14..18b820a153 100644 --- a/build-aux/download.scm +++ b/build-aux/download.scm @@ -36,11 +36,6 @@ ;;"http://www.fdn.fr/~lcourtes/software/guix/packages" ) -;; XXX: Work around , present in Guile -;; up to 2.0.7. -(module-define! (resolve-module '(web client)) - 'shutdown (const #f)) - (define (file-name->uri file) "Return the URI for FILE." (match (string-tokenize file (char-set-complement (char-set #\/))) diff --git a/configure.ac b/configure.ac index 3bf2bf1610..76f52e0ec3 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,7 @@ if test "x$GUILD" = "x"; then fi if test "x$GUILE_EFFECTIVE_VERSION" = "x2.0"; then - PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7]) + PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.9]) fi dnl Installation directory for .scm and .go files. 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 diff --git a/guix/build/download.scm b/guix/build/download.scm index e7a7afecd1..d956a9f33e 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -512,12 +512,6 @@ port if PORT is a TLS session record port." 'set-port-encoding! (lambda (p e) #f)) -;; XXX: Work around , present in Guile -;; up to 2.0.7. -(module-define! (resolve-module '(web client)) - 'shutdown (const #f)) - - ;; XXX: Work around , fixed in Guile commit ;; 16050431f29d56f80c4a8253506fc851b8441840. Guile's date validation ;; procedure rejects dates in which the hour is not padded with a zero but @@ -682,12 +676,6 @@ the connection could not be established in less than TIMEOUT seconds. Return FILE on success. When VERIFY-CERTIFICATE? is true, verify HTTPS certificates; otherwise simply ignore them." - (define post-2.0.7? - (or (> (string->number (major-version)) 2) - (> (string->number (minor-version)) 0) - (> (string->number (micro-version)) 7) - (string>? (version) "2.0.7"))) - (define headers `(;; Some web sites, such as http://dist.schmorp.de, would block you if ;; there's no 'User-Agent' header, presumably on the assumption that @@ -712,20 +700,9 @@ certificates; otherwise simply ignore them." #:verify-certificate? verify-certificate?)) ((resp bv-or-port) - ;; XXX: `http-get*' was introduced in 2.0.7, and replaced by - ;; #:streaming? in 2.0.8. We know we're using it within the - ;; chroot, but `guix-download' might be using a different - ;; version. So keep this compatibility hack for now. - (if post-2.0.7? - (http-get uri #:port connection #:decode-body? #f - #:streaming? #t - #:headers headers) - (if (module-defined? (resolve-interface '(web client)) - 'http-get*) - (http-get* uri #:port connection #:decode-body? #f - #:headers headers) - (http-get uri #:port connection #:decode-body? #f - #:extra-headers headers)))) + (http-get uri #:port connection #:decode-body? #f + #:streaming? #t + #:headers headers)) ((code) (response-code resp)) ((size) diff --git a/guix/http-client.scm b/guix/http-client.scm index 78d39a0208..855ae95a43 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -217,10 +217,6 @@ or if EOF is reached." (when (module-variable %web-http 'read-line*) (module-set! %web-http 'read-line* read-header-line)))) -;; XXX: Work around , present in Guile -;; up to 2.0.7. -(module-define! (resolve-module '(web client)) - 'shutdown (const #f)) (define* (http-fetch uri #:key port (text? #f) (buffered? #t) keep-alive? (verify-certificate? #t) @@ -252,14 +248,9 @@ Raise an '&http-get-error' condition if downloading fails." (unless (or buffered? (not (file-port? port))) (setvbuf port _IONBF)) (let*-values (((resp data) - ;; Try hard to use the API du jour to get an input port. - (if (guile-version>? "2.0.7") - (http-get uri #:streaming? #t #:port port - #:keep-alive? #t - #:headers headers) ; 2.0.9+ - (http-get* uri #:decode-body? text? ; 2.0.7 - #:keep-alive? #t - #:port port #:headers headers))) + (http-get uri #:streaming? #t #:port port + #:keep-alive? #t + #:headers headers)) ((code) (response-code resp))) (case code diff --git a/guix/serialization.scm b/guix/serialization.scm index 4cab5910f7..4a8cd2086e 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -130,8 +130,7 @@ ;; . See for ;; a discussion. (let ((bv (read-byte-string p))) - ;; XXX: Rewrite using (ice-9 iconv) when the minimum requirement is - ;; upgraded to Guile >= 2.0.9. + ;; XXX: Rewrite using (ice-9 iconv). (list->string (map integer->char (bytevector->u8-list bv))))) (define (read-maybe-utf8-string p) diff --git a/tests/nar.scm b/tests/nar.scm index 28ead8b783..61646db964 100644 --- a/tests/nar.scm +++ b/tests/nar.scm @@ -35,6 +35,7 @@ #:use-module (srfi srfi-64) #:use-module (ice-9 ftw) #:use-module (ice-9 regex) + #:use-module ((ice-9 control) #:select (let/ec)) #:use-module (ice-9 match)) ;; Test the (guix nar) module. @@ -148,17 +149,6 @@ (string-append (dirname (search-path %load-path "pre-inst-env")) "/test-nar-" (number->string (getpid)))) -(define-syntax-rule (let/ec k exp...) - ;; This one appeared in Guile 2.0.9, so provide a copy here. - (let ((tag (make-prompt-tag))) - (call-with-prompt tag - (lambda () - (let ((k (lambda args - (apply abort-to-prompt tag args)))) - exp...)) - (lambda (_ . args) - (apply values args))))) - (test-begin "nar") -- cgit v1.2.3 From 7f608a9b45fc3d0dd209268150ef94cbd45da8ee Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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') 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') 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') 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: Ludovic Courtès 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 +++--- gnu/packages/bioinformatics.scm | 2 +- gnu/packages/guile.scm | 26 +++++++++++--------------- gnu/packages/tls.scm | 2 +- tests/guix-build.sh | 4 ++-- 5 files changed, 18 insertions(+), 22 deletions(-) (limited to 'doc') 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}}). diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index ccde01b119..90092ddf70 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -7638,7 +7638,7 @@ library implementing most of the pipeline's features.") (inputs `(("r-minimal" ,r-minimal) ("r-rcas" ,r-rcas) - ("guile-next" ,guile-next) + ("guile-next" ,guile-2.2) ("guile-json" ,guile2.2-json) ("guile-redis" ,guile2.2-redis))) (native-inputs diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 9289c40a76..c172fd3fc1 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -231,9 +231,9 @@ without requiring the source code to be rewritten.") "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p")) (patches (search-patches "guile-repl-server-test.patch")))))) -(define-public guile-next +(define-public guile-2.2 (package (inherit guile-2.0) - (name "guile-next") + (name "guile") (version "2.2.0") (replacement #f) (source (origin @@ -250,12 +250,8 @@ without requiring the source code to be rewritten.") ;; times (almost 3 hours on a 4-core Intel i5). (snippet '(for-each delete-file (find-files "prebuilt" "\\.go$"))))) - (synopsis "Snapshot of what will become version 2.2 of GNU Guile") (properties '((timeout . 72000) ;20 hours - (max-silent-time . 10800) ;3 hours (needed on ARM) - (upstream-name . "guile") - (ftp-server . "alpha.gnu.org") - (ftp-directory . "/gnu/guile"))) + (max-silent-time . 10800))) ;3 hours (needed on ARM) (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH") @@ -276,12 +272,12 @@ applicable." (define package-for-guile-2.2 ;; A procedure that rewrites the dependency tree of the given package to use - ;; GUILE-NEXT instead of GUILE-2.0. - (package-input-rewriting `((,guile-2.0 . ,guile-next)) + ;; GUILE-2.2 instead of GUILE-2.0. + (package-input-rewriting `((,guile-2.0 . ,guile-2.2)) guile-2.2-package-name)) (define-public guile-for-guile-emacs - (package (inherit guile-next) + (package (inherit guile-2.2) (name "guile-for-guile-emacs") (version "20150510.d8d9a8d") (source (origin @@ -296,7 +292,7 @@ applicable." (substitute-keyword-arguments `(;; Tests aren't passing for now. ;; Obviously we should re-enable this! #:tests? #f - ,@(package-arguments guile-next)) + ,@(package-arguments guile-2.2)) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'autogen @@ -314,7 +310,7 @@ applicable." ("flex" ,flex) ("texinfo" ,texinfo) ("gettext" ,gettext-minimal) - ,@(package-native-inputs guile-next))) + ,@(package-native-inputs guile-2.2))) ;; Same as in guile-2.0 (native-search-paths (list (search-path-specification @@ -1641,7 +1637,7 @@ and then run @command{scm example.scm}.") (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) - ("guile" ,guile-next) + ("guile" ,guile-2.2) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (arguments @@ -1657,7 +1653,7 @@ and then run @command{scm example.scm}.") "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming library for GNU Guile based on the actor model. -Note that 8sync is only available for Guile 2.2 (guile-next in Guix).") +Note that 8sync is only available for Guile 2.2.") (license license:lgpl3+))) (define-public guile-fibers @@ -1676,7 +1672,7 @@ Note that 8sync is only available for Guile 2.2 (guile-next in Guix).") `(("texinfo" ,texinfo) ("pkg-config" ,pkg-config))) (inputs - `(("guile" ,guile-next))) + `(("guile" ,guile-2.2))) (synopsis "Lightweight concurrency facility for Guile") (description "Fibers is a Guile library that implements a a lightweight concurrency diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 32aa7a61dc..9c7cb0b0ca 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -238,7 +238,7 @@ required structures.") (substitute-keyword-arguments (package-arguments gnutls-3.5.8) ((#:configure-flags flags) `(cdr ,flags)))) - (inputs `(("guile" ,guile-next) + (inputs `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs gnutls-3.5.8)))))) (define-public openssl diff --git a/tests/guix-build.sh b/tests/guix-build.sh index e1ec560641..ab911b7210 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès # # This file is part of GNU Guix. # @@ -160,7 +160,7 @@ rm -f "$result" guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes # Replacements. -drv1=`guix build guix --with-input=guile=guile-next -d` +drv1=`guix build guix --with-input=guile@2.0=guile@2.2 -d` drv2=`guix build guix -d` test "$drv1" != "$drv2" -- cgit v1.2.3