summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-19 16:53:01 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-19 16:53:01 +0200
commit7abe35febe4234609e14e169b6fcc0cbaf4c7119 (patch)
tree5a8307a28e0c0a6aeab21ce8b9d3487229522588 /guix
parent457ded48c54ba04489cb871d3ec6bda0c59bead7 (diff)
parent5c10d55206a4f7a9b932ff08512a4f50c1db35be (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r--guix/build/syscalls.scm50
-rw-r--r--guix/gnupg.scm11
-rw-r--r--guix/import/json.scm61
-rw-r--r--guix/import/print.scm96
-rw-r--r--guix/import/utils.scm36
-rw-r--r--guix/scripts/build.scm7
-rw-r--r--guix/scripts/import/json.scm12
-rw-r--r--guix/scripts/package.scm7
-rw-r--r--guix/status.scm6
-rw-r--r--guix/tests/git.scm37
-rw-r--r--guix/ui.scm14
11 files changed, 220 insertions, 117 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 0938ec0ff1..7ef03417c1 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -22,7 +22,6 @@
(define-module (guix build syscalls)
#:use-module (system foreign)
- #:use-module (system base target) ;for cross-compilation support
#:use-module (rnrs bytevectors)
#:autoload (ice-9 binary-ports) (get-bytevector-n)
#:use-module (srfi srfi-1)
@@ -892,36 +891,6 @@ system to PUT-OLD."
(namelen uint8)
(name uint8))
-(define-syntax define-generic-identifier
- (syntax-rules (gnu/linux gnu/hurd =>)
- "Define a generic identifier that adjust to the current GNU variant."
- ((_ id (gnu/linux => linux) (gnu/hurd => hurd))
- (define-syntax id
- (lambda (s)
- (syntax-case s ()
- ((_ args (... ...))
- (if (string-contains (or (target-type) %host-type)
- "linux")
- #'(linux args (... ...))
- #'(hurd args (... ...))))
- (_
- (if (string-contains (or (target-type) %host-type)
- "linux")
- #'linux
- #'hurd))))))))
-
-(define-generic-identifier read-dirent-header
- (gnu/linux => read-dirent-header/linux)
- (gnu/hurd => read-dirent-header/hurd))
-
-(define-generic-identifier %struct-dirent-header
- (gnu/linux => %struct-dirent-header/linux)
- (gnu/hurd => %struct-dirent-header/hurd))
-
-(define-generic-identifier sizeof-dirent-header
- (gnu/linux => sizeof-dirent-header/linux)
- (gnu/hurd => sizeof-dirent-header/hurd))
-
;; Constants for the 'type' field, from <dirent.h>.
(define DT_UNKNOWN 0)
(define DT_FIFO 1)
@@ -960,19 +929,30 @@ system to PUT-OLD."
"closedir: ~A" (list (strerror err))
(list err)))))))
-(define readdir*
+(define (readdir-procedure name-field-offset sizeof-dirent-header
+ read-dirent-header)
(let ((proc (syscall->procedure '* "readdir64" '(*))))
(lambda* (directory #:optional (pointer->string pointer->string/utf-8))
(let ((ptr (proc directory)))
(and (not (null-pointer? ptr))
(cons (pointer->string
- (make-pointer (+ (pointer-address ptr)
- (c-struct-field-offset
- %struct-dirent-header name)))
+ (make-pointer (+ (pointer-address ptr) name-field-offset))
-1)
(read-dirent-header
(pointer->bytevector ptr sizeof-dirent-header))))))))
+(define readdir*
+ ;; Decide at run time which one must be used.
+ (if (string-suffix? "linux-gnu" %host-type)
+ (readdir-procedure (c-struct-field-offset %struct-dirent-header/linux
+ name)
+ sizeof-dirent-header/linux
+ read-dirent-header/linux)
+ (readdir-procedure (c-struct-field-offset %struct-dirent-header/hurd
+ name)
+ sizeof-dirent-header/hurd
+ read-dirent-header/hurd)))
+
(define* (scandir* name #:optional
(select? (const #t))
(entry<? (lambda (entry1 entry2)
diff --git a/guix/gnupg.scm b/guix/gnupg.scm
index bf0283f8fe..5fae24b325 100644
--- a/guix/gnupg.scm
+++ b/guix/gnupg.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2010, 2011, 2013, 2014, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -71,6 +72,8 @@
"^\\[GNUPG:\\] VALIDSIG ([[:xdigit:]]+) ([[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}) ([[:digit:]]+) .*$"))
(define expkeysig-rx ; good signature, but expired key
(make-regexp "^\\[GNUPG:\\] EXPKEYSIG ([[:xdigit:]]+) (.*)$"))
+(define revkeysig-rx ; good signature, but revoked key
+ (make-regexp "^\\[GNUPG:\\] REVKEYSIG ([[:xdigit:]]+) (.*)$"))
(define errsig-rx
;; Note: The fingeprint part (the last element of the line) appeared in
;; GnuPG 2.2.7 according to 'doc/DETAILS', and it may be missing.
@@ -114,6 +117,11 @@ revoked. Return a status s-exp if GnuPG failed."
(lambda (match)
`(expired-key-signature ,(match:substring match 1) ; fingerprint
,(match:substring match 2)))) ; user name
+ ((regexp-exec revkeysig-rx line)
+ =>
+ (lambda (match)
+ `(revoked-key-signature ,(match:substring match 1) ; fingerprint
+ ,(match:substring match 2)))) ; user name
((regexp-exec errsig-rx line)
=>
(lambda (match)
@@ -157,7 +165,8 @@ a fingerprint/user pair; return #f otherwise."
(match (assq 'valid-signature status)
(('valid-signature fingerprint date timestamp)
(match (or (assq 'good-signature status)
- (assq 'expired-key-signature status))
+ (assq 'expired-key-signature status)
+ (assq 'revoked-key-signature status))
((_ key-id user) (cons fingerprint user))
(_ #f)))
(_
diff --git a/guix/import/json.scm b/guix/import/json.scm
index 8900724dcd..0c98bb25b8 100644
--- a/guix/import/json.scm
+++ b/guix/import/json.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,8 +23,16 @@
#:use-module (json)
#:use-module (guix http-client)
#:use-module (guix import utils)
+ #:use-module (guix import print)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 rdelim)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-2)
+ #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
- #:export (json-fetch))
+ #:export (json-fetch
+ json->code
+ json->scheme-file))
(define* (json-fetch url
;; Note: many websites returns 403 if we omit a
@@ -42,3 +51,53 @@ the query."
(result (json->scm port)))
(close-port port)
result)))
+
+(define (json->code file-name)
+ "Read FILE-NAME containing one ore more JSON package definitions and return
+a list of S-expressions, or return #F when the JSON is invalid."
+ (catch 'json-invalid
+ (lambda ()
+ (let ((json (json-string->scm
+ (with-input-from-file file-name read-string))))
+ (match json
+ (#(packages ...)
+ ;; To allow definitions to refer to one another, collect references
+ ;; to local definitions and tell alist->package to ignore them.
+ (second
+ (memq #:result
+ (fold
+ (lambda (pkg names+result)
+ (match names+result
+ ((#:names names #:result result)
+ (list #:names
+ (cons (assoc-ref pkg "name") names)
+ #:result
+ (append result
+ (list
+ (package->code (alist->package pkg names))
+ (string->symbol (assoc-ref pkg "name"))))))))
+ (list #:names '()
+ #:result '())
+ packages))))
+ (package
+ (list (package->code (alist->package json))
+ (string->symbol (assoc-ref json "name")))))))
+ (const #f)))
+
+(define (json->scheme-file file)
+ "Convert the FILE containing a JSON package definition to a Scheme
+representation and return the new file name (or #F on error)."
+ (and-let* ((sexprs (json->code file))
+ (file* (let* ((tempdir (or (getenv "TMPDIR") "/tmp"))
+ (template (string-append tempdir "/guix-XXXXXX"))
+ (port (mkstemp! template)))
+ (close-port port)
+ template)))
+ (call-with-output-file file*
+ (lambda (port)
+ (write '(use-modules (gnu)
+ (guix)
+ ((guix licenses) #:prefix license:))
+ port)
+ (for-each (cut write <> port) sexprs)))
+ file*))
diff --git a/guix/import/print.scm b/guix/import/print.scm
index 4c2a91fa4f..11cc218285 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,7 +57,7 @@ when evaluated."
;; Print either license variable name or the code for a license object
(define (license->code lic)
(let ((var (variable-name lic '(guix licenses))))
- (or var
+ (or (symbol-append 'license: var)
`(license
(name ,(license-name lic))
(uri ,(license-uri lic))
@@ -79,7 +79,9 @@ when evaluated."
(patches (origin-patches source)))
`(origin
(method ,(procedure-name method))
- (uri (string-append ,@(factorize-uri uri version)))
+ (uri (string-append ,@(match (factorize-uri uri version)
+ ((? string? uri) (list uri))
+ (factorized factorized))))
(sha256
(base32
,(format #f "~a" (bytevector->nix-base32-string sha256))))
@@ -92,6 +94,8 @@ when evaluated."
(define (package-lists->code lsts)
(list 'quasiquote
(map (match-lambda
+ ((? symbol? s)
+ (list (symbol->string s) (list 'unquote s)))
((label pkg . out)
(let ((mod (package-module-name pkg)))
(cons* label
@@ -121,45 +125,47 @@ when evaluated."
(home-page (package-home-page package))
(supported-systems (package-supported-systems package))
(properties (package-properties package)))
- `(package
- (name ,name)
- (version ,version)
- (source ,(source->code source version))
- ,@(match properties
- (() '())
- (_ `((properties ,properties))))
- ,@(if replacement
- `((replacement ,replacement))
- '())
- (build-system ,(symbol-append (build-system-name build-system)
- '-build-system))
- ,@(match arguments
- (() '())
- (args `((arguments ,(list 'quasiquote args)))))
- ,@(match outputs
- (("out") '())
- (outs `((outputs (list ,@outs)))))
- ,@(match native-inputs
- (() '())
- (pkgs `((native-inputs ,(package-lists->code pkgs)))))
- ,@(match inputs
- (() '())
- (pkgs `((inputs ,(package-lists->code pkgs)))))
- ,@(match propagated-inputs
- (() '())
- (pkgs `((propagated-inputs ,(package-lists->code pkgs)))))
- ,@(if (lset= string=? supported-systems %supported-systems)
- '()
- `((supported-systems (list ,@supported-systems))))
- ,@(match (map search-path-specification->code native-search-paths)
- (() '())
- (paths `((native-search-paths (list ,@paths)))))
- ,@(match (map search-path-specification->code search-paths)
- (() '())
- (paths `((search-paths (list ,@paths)))))
- (home-page ,home-page)
- (synopsis ,synopsis)
- (description ,description)
- (license ,(if (list? license)
- `(list ,@(map license->code license))
- (license->code license))))))
+ `(define-public ,(string->symbol name)
+ (package
+ (name ,name)
+ (version ,version)
+ (source ,(source->code source version))
+ ,@(match properties
+ (() '())
+ (_ `((properties ,properties))))
+ ,@(if replacement
+ `((replacement ,replacement))
+ '())
+ (build-system (@ (guix build-system ,(build-system-name build-system))
+ ,(symbol-append (build-system-name build-system)
+ '-build-system)))
+ ,@(match arguments
+ (() '())
+ (args `((arguments ,(list 'quasiquote args)))))
+ ,@(match outputs
+ (("out") '())
+ (outs `((outputs (list ,@outs)))))
+ ,@(match native-inputs
+ (() '())
+ (pkgs `((native-inputs ,(package-lists->code pkgs)))))
+ ,@(match inputs
+ (() '())
+ (pkgs `((inputs ,(package-lists->code pkgs)))))
+ ,@(match propagated-inputs
+ (() '())
+ (pkgs `((propagated-inputs ,(package-lists->code pkgs)))))
+ ,@(if (lset= string=? supported-systems %supported-systems)
+ '()
+ `((supported-systems (list ,@supported-systems))))
+ ,@(match (map search-path-specification->code native-search-paths)
+ (() '())
+ (paths `((native-search-paths (list ,@paths)))))
+ ,@(match (map search-path-specification->code search-paths)
+ (() '())
+ (paths `((search-paths (list ,@paths)))))
+ (home-page ,home-page)
+ (synopsis ,synopsis)
+ (description ,description)
+ (license ,(if (list? license)
+ `(list ,@(map license->code license))
+ (license->code license)))))))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 94c8cb040b..3809c3d074 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012, 2013, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
;;;
@@ -310,7 +310,23 @@ the expected fields of an <origin> object."
(uri (assoc-ref orig "uri"))
(sha256 sha))))))
-(define (alist->package meta)
+(define* (alist->package meta #:optional (known-inputs '()))
+ "Return a package value generated from the alist META. If the list of
+strings KNOWN-INPUTS is provided, do not treat the mentioned inputs as
+specifications to look up and replace them with plain symbols instead."
+ (define (process-inputs which)
+ (let-values (((regular known)
+ (lset-diff+intersection
+ string=?
+ (vector->list (or (assoc-ref meta which) #()))
+ known-inputs)))
+ (append (specs->package-lists regular)
+ (map string->symbol known))))
+ (define (process-arguments arguments)
+ (append-map (match-lambda
+ ((key . value)
+ (list (symbol->keyword (string->symbol key)) value)))
+ arguments))
(package
(name (assoc-ref meta "name"))
(version (assoc-ref meta "version"))
@@ -318,15 +334,13 @@ the expected fields of an <origin> object."
(build-system
(lookup-build-system-by-name
(string->symbol (assoc-ref meta "build-system"))))
- (native-inputs
- (specs->package-lists
- (vector->list (or (assoc-ref meta "native-inputs") '#()))))
- (inputs
- (specs->package-lists
- (vector->list (or (assoc-ref meta "inputs") '#()))))
- (propagated-inputs
- (specs->package-lists
- (vector->list (or (assoc-ref meta "propagated-inputs") '#()))))
+ (arguments
+ (or (and=> (assoc-ref meta "arguments")
+ process-arguments)
+ '()))
+ (native-inputs (process-inputs "native-inputs"))
+ (inputs (process-inputs "inputs"))
+ (propagated-inputs (process-inputs "propagated-inputs"))
(home-page
(assoc-ref meta "home-page"))
(synopsis
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 79bd84a1a0..8ff2fd1910 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (guix scripts build)
#:use-module (guix ui)
#:use-module (guix scripts)
+ #:use-module (guix import json)
#:use-module (guix store)
#:use-module (guix derivations)
#:use-module (guix packages)
@@ -834,7 +836,10 @@ build---packages, gexps, derivations, and so on."
(else
(list (specification->package spec)))))
(('file . file)
- (ensure-list (load* file (make-user-module '()))))
+ (let ((file (or (and (string-suffix? ".json" file)
+ (json->scheme-file file))
+ file)))
+ (ensure-list (load* file (make-user-module '())))))
(('manifest . manifest)
(map manifest-entry-item
(manifest-entries
diff --git a/guix/scripts/import/json.scm b/guix/scripts/import/json.scm
index c9daf65479..778e5f4bc5 100644
--- a/guix/scripts/import/json.scm
+++ b/guix/scripts/import/json.scm
@@ -23,7 +23,7 @@
#:use-module (guix utils)
#:use-module (guix scripts)
#:use-module (guix import utils)
- #:use-module (guix import print)
+ #:use-module (guix import json)
#:use-module (guix scripts import)
#:use-module (guix packages)
#:use-module (srfi srfi-1)
@@ -88,14 +88,8 @@ Import and convert the JSON package definition in PACKAGE-FILE.\n"))
(reverse opts))))
(match args
((file-name)
- (catch 'json-invalid
- (lambda ()
- (let ((json (json-string->scm
- (with-input-from-file file-name read-string))))
- ;; TODO: also print define-module boilerplate
- (package->code (alist->package json))))
- (lambda _
- (leave (G_ "invalid JSON in file '~a'~%") file-name))))
+ (or (json->code file-name)
+ (leave (G_ "invalid JSON in file '~a'~%") file-name)))
(()
(leave (G_ "too few arguments~%")))
((many ...)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b2b734aadd..43a3bb2825 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,6 +34,7 @@
#:use-module (guix packages)
#:use-module (guix profiles)
#:use-module (guix search-paths)
+ #:use-module (guix import json)
#:use-module (guix monads)
#:use-module (guix utils)
#:use-module (guix config)
@@ -416,7 +418,10 @@ Install, remove, or upgrade packages in a single transaction.\n"))
(option '(#\f "install-from-file") #t #f
(lambda (opt name arg result arg-handler)
(values (alist-cons 'install
- (load* arg (make-user-module '()))
+ (let ((file (or (and (string-suffix? ".json" arg)
+ (json->scheme-file arg))
+ arg)))
+ (load* file (make-user-module '())))
result)
#f)))
(option '(#\r "remove") #f #t
diff --git a/guix/status.scm b/guix/status.scm
index 4b2edc2f3c..f40d5d59b9 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -472,8 +472,8 @@ addition to build events."
(let ((count (match (assq-ref properties 'graft)
(#f 0)
(lst (or (assq-ref lst 'count) 0)))))
- (format port (info (N_ "applying ~a graft for ~a..."
- "applying ~a grafts for ~a..."
+ (format port (info (N_ "applying ~a graft for ~a ..."
+ "applying ~a grafts for ~a ..."
count))
count drv)))
('profile
@@ -525,7 +525,7 @@ addition to build events."
(newline port)))
(('download-started item uri _ ...)
(erase-current-line*)
- (format port (info (G_ "downloading from ~a...")) uri)
+ (format port (info (G_ "downloading from ~a ...")) uri)
(newline port))
(('download-progress item uri
(= string->number size)
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 21573ac14e..566660e85e 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,6 +30,24 @@
(define git-command
(make-parameter "git"))
+(define (call-with-environment-variables variables thunk)
+ "Call THUNK with the environment VARIABLES set."
+ (let ((environment (environ)))
+ (dynamic-wind
+ (lambda ()
+ (for-each (match-lambda
+ ((variable value)
+ (setenv variable value)))
+ variables))
+ thunk
+ (lambda ()
+ (environ environment)))))
+
+(define-syntax-rule (with-environment-variables variables exp ...)
+ "Evaluate EXP with the given environment VARIABLES set."
+ (call-with-environment-variables variables
+ (lambda () exp ...)))
+
(define (populate-git-repository directory directives)
"Initialize a new Git checkout and repository in DIRECTORY and apply
DIRECTIVES. Each element of DIRECTIVES is an sexp like:
@@ -41,8 +59,21 @@ Return DIRECTORY on success."
;; Note: As of version 0.2.0, Guile-Git lacks the necessary bindings to do
;; all this, so resort to the "git" command.
(define (git command . args)
- (apply invoke (git-command) "-C" directory
- command args))
+ ;; Make sure Git doesn't rely on the user's config.
+ (call-with-temporary-directory
+ (lambda (home)
+ (call-with-output-file (string-append home "/.gitconfig")
+ (lambda (port)
+ (display "[user]
+ email = charlie@example.org\n name = Charlie Guix\n"
+ port)))
+
+ (with-environment-variables
+ `(("GIT_CONFIG_NOSYSTEM" "1")
+ ("GIT_ATTR_NOSYSTEM" "1")
+ ("HOME" ,home))
+ (apply invoke (git-command) "-C" directory
+ command args)))))
(mkdir-p directory)
(git "init")
diff --git a/guix/ui.scm b/guix/ui.scm
index 1ccc80a000..ea5f460865 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -234,8 +234,8 @@ information, or #f if it could not be found."
;; Give 'load' an absolute file name so that it doesn't try to
;; search for FILE in %LOAD-PATH. Note: use 'load', not
- ;; 'primitive-load', so that FILE is compiled, which then allows us
- ;; to provide better error reporting with source line numbers.
+ ;; 'primitive-load', so that FILE is compiled, which then allows
+ ;; us to provide better error reporting with source line numbers.
(load (canonicalize-path file)))
(const #f))))))
(lambda _
@@ -796,7 +796,7 @@ directories:~{ ~a~}~%")
(apply format #f format-string format-args))))))
(define-syntax-rule (leave-on-EPIPE exp ...)
- "Run EXP... in a context when EPIPE errors are caught and lead to 'exit'
+ "Run EXP... in a context where EPIPE errors are caught and lead to 'exit'
with successful exit code. This is useful when writing to the standard output
may lead to EPIPE, because the standard output is piped through 'head' or
similar."
@@ -925,7 +925,7 @@ download."
drv))
(define substitutable-info
- ;; Call 'substitutation-oracle' upfront so we don't end up launching the
+ ;; Call 'substitution-oracle' upfront so we don't end up launching the
;; substituter many times. This makes a big difference, especially when
;; DRV is a long list as is the case with 'guix environment'.
(if use-substitutes?
@@ -1251,7 +1251,7 @@ separator between subsequent columns."
(define* (indented-string str indent
#:key (initial-indent? #t))
- "Return STR with each newline preceded by IDENT spaces. When
+ "Return STR with each newline preceded by INDENT spaces. When
INITIAL-INDENT? is true, the first line is also indented."
(define indent-string
(make-list indent #\space))
@@ -1534,7 +1534,7 @@ score, the more relevant OBJ is to REGEXPS."
(,(lambda (package)
(filter (lambda (output)
(not (member output
- ;; Some common outpus shared by many packages.
+ ;; Some common outputs shared by many packages.
'("out" "doc" "debug" "lib" "include" "bin"))))
(package-outputs package)))
. 1)
@@ -1942,7 +1942,7 @@ found."
(define (run-guix . args)
"Run the 'guix' command defined by command line ARGS.
Unlike 'guix-main', this procedure assumes that locale, i18n support,
-and signal handling has already been set up."
+and signal handling have already been set up."
(define option? (cut string-prefix? "-" <>))
;; The default %LOAD-EXTENSIONS includes the empty string, which doubles the