summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/clojure.scm14
-rw-r--r--guix/build-system/guile.scm10
-rw-r--r--guix/build-system/minify.scm4
-rw-r--r--guix/build/asdf-build-system.scm2
-rw-r--r--guix/build/download.scm80
-rw-r--r--guix/channels.scm8
-rw-r--r--guix/gexp.scm35
-rw-r--r--guix/git.scm21
-rw-r--r--guix/http-client.scm13
-rw-r--r--guix/import/cran.scm12
-rw-r--r--guix/import/crate.scm9
-rw-r--r--guix/lint.scm33
-rw-r--r--guix/scripts/build.scm8
-rw-r--r--guix/scripts/gc.scm6
-rw-r--r--guix/scripts/import/crate.scm2
-rw-r--r--guix/scripts/pack.scm6
-rw-r--r--guix/scripts/publish.scm6
-rw-r--r--guix/scripts/pull.scm6
-rwxr-xr-xguix/scripts/substitute.scm7
-rw-r--r--guix/ui.scm4
-rw-r--r--guix/utils.scm7
21 files changed, 195 insertions, 98 deletions
diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index d70535c9e3..607f67aaec 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,12 +44,18 @@
;; Code:
(define-with-docs %clojure-build-system-modules
- "Build-side modules imported and used by default."
+ "Build-side modules imported by default."
`((guix build clojure-build-system)
(guix build clojure-utils)
(guix build guile-build-system)
,@%ant-build-system-modules))
+(define %default-modules
+ ;; Modules in scope in the build-side environment.
+ '((guix build clojure-build-system)
+ (guix build clojure-utils)
+ (guix build utils)))
+
(define-with-docs %default-clojure
"The default Clojure package."
(delay (@* (gnu packages clojure) clojure)))
@@ -133,15 +140,14 @@
(test-include `',%test-include)
(test-exclude `',%test-exclude)
- (phases '(@ (guix build clojure-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
(guile #f)
(imported-modules %clojure-build-system-modules)
- (modules %clojure-build-system-modules))
+ (modules %default-modules))
"Build SOURCE with INPUTS."
(let ((builder `(begin
(use-modules ,@modules)
diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm
index 2c5cc968ce..3693014694 100644
--- a/guix/build-system/guile.scm
+++ b/guix/build-system/guile.scm
@@ -36,6 +36,7 @@
(define* (lower name
#:key source inputs native-inputs outputs system target
+ (implicit-inputs? #t)
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
@@ -45,7 +46,8 @@
;; procedures like 'package-for-guile-2.0' unchanged and simple.
(define private-keywords
- '(#:target #:inputs #:native-inputs))
+ '(#:target #:inputs #:native-inputs
+ #:implicit-inputs?))
(bag
(name name)
@@ -56,8 +58,10 @@
`(("source" ,source))
'())
,@native-inputs
- ,@(map (cute assoc <> (standard-packages))
- '("tar" "gzip" "bzip2" "xz" "locales"))))
+ ,@(if implicit-inputs?
+ (map (cute assoc <> (standard-packages))
+ '("tar" "gzip" "bzip2" "xz" "locales"))
+ '())))
(outputs outputs)
(build (if target guile-cross-build guile-build))
(arguments (strip-keyword-arguments private-keywords arguments))))
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 1418a71091..28a6781c06 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -44,8 +44,8 @@
(define (default-uglify-js)
"Return the default package to minify JavaScript source files."
;; Lazily resolve the binding to avoid a circular dependency.
- (let ((js-mod (resolve-interface '(gnu packages javascript))))
- (module-ref js-mod 'uglify-js)))
+ (let ((mod (resolve-interface '(gnu packages lisp-xyz))))
+ (module-ref mod 'uglify-js)))
(define* (lower name
#:key source inputs native-inputs outputs system
diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm
index dd6373b33a..1be2b3c5f0 100644
--- a/guix/build/asdf-build-system.scm
+++ b/guix/build/asdf-build-system.scm
@@ -79,7 +79,7 @@ valid."
(let ((source (getcwd))
(target (source-directory out name))
(system-path (string-append out %system-install-prefix)))
- (copy-recursively source target)
+ (copy-recursively source target #:keep-mtime? #t)
(mkdir-p system-path)
(for-each
(lambda (file)
diff --git a/guix/build/download.scm b/guix/build/download.scm
index 53a144f126..0f2d5f402a 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
@@ -28,6 +28,7 @@
#:use-module (guix build utils)
#:use-module (guix progress)
#:use-module (rnrs io ports)
+ #:use-module ((ice-9 binary-ports) #:select (unget-bytevector))
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
@@ -154,20 +155,12 @@ out if the connection could not be established in less than TIMEOUT seconds."
;; be bound if we need them, because (guix download) adds GnuTLS as an
;; input in that case.
-;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
-;; See <http://bugs.gnu.org/12202>.
-(module-autoload! (current-module)
- '(gnutls)
- '(make-session connection-end/client))
-
-(define %tls-ports
- ;; Mapping of session record ports to the underlying file port.
- (make-weak-key-hash-table))
-
-(define (register-tls-record-port record-port port)
- "Hold a weak reference from RECORD-PORT to PORT, where RECORD-PORT is a TLS
-session record port using PORT as its underlying communication port."
- (hashq-set! %tls-ports record-port port))
+(define (load-gnutls)
+ ;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
+ ;; See <http://bugs.gnu.org/12202>.
+ (module-use! (resolve-module '(guix build download))
+ (resolve-interface '(gnutls)))
+ (set! load-gnutls (const #t)))
(define %x509-certificate-directory
;; The directory where X.509 authority PEM certificates are stored.
@@ -253,6 +246,7 @@ host name without trailing dot."
(format (current-error-port)
"gnutls: [~a|~a] ~a" (getpid) level str))
+ (load-gnutls)
(let ((session (make-session connection-end/client))
(ca-certs (%x509-certificate-directory)))
@@ -311,17 +305,40 @@ host name without trailing dot."
(apply throw args))))
(let ((record (session-record-port session)))
- ;; Since we use `fileno' above, the file descriptor behind PORT would be
- ;; closed when PORT is GC'd. If we used `port->fdes', it would instead
- ;; never be closed. So we use `fileno', but keep a weak reference to
- ;; PORT, so the file descriptor gets closed when RECORD is GC'd.
- (register-tls-record-port record port)
-
- ;; Write HTTP requests line by line rather than byte by byte:
- ;; <https://bugs.gnu.org/22966>. This is possible with Guile >= 2.2.
- (setvbuf record 'line)
-
- record)))
+ (define (read! bv start count)
+ (define read-bv (get-bytevector-some record))
+ (if (eof-object? read-bv)
+ 0 ; read! returns 0 on eof-object
+ (let ((read-bv-len (bytevector-length read-bv)))
+ (bytevector-copy! read-bv 0 bv start (min read-bv-len count))
+ (when (< count read-bv-len)
+ (unget-bytevector record bv count (- read-bv-len count)))
+ read-bv-len)))
+ (define (write! bv start count)
+ (put-bytevector record bv start count)
+ (force-output record)
+ count)
+ (define (get-position)
+ (port-position record))
+ (define (set-position! new-position)
+ (set-port-position! record new-position))
+ (define (close)
+ (unless (port-closed? port)
+ (close-port port))
+ (unless (port-closed? record)
+ (close-port record)))
+
+ (setvbuf record 'block)
+
+ ;; Return a port that wraps RECORD to ensure that closing it also
+ ;; closes PORT, the actual socket port, and its file descriptor.
+ ;; XXX: This wrapper would be unnecessary if GnuTLS could
+ ;; automatically close SESSION's file descriptor when RECORD is
+ ;; closed, but that doesn't seem to be possible currently (as of
+ ;; 3.6.9).
+ (make-custom-binary-input/output-port "gnutls wrapped port" read! write!
+ get-position set-position!
+ close))))
(define (ensure-uri uri-or-string) ;XXX: copied from (web http)
(cond
@@ -429,16 +446,9 @@ VERIFY-CERTIFICATE? is true, verify HTTPS server certificates."
#:verify-certificate? verify-certificate?)
s)))))
-(define (close-connection port)
- "Like 'close-port', but (1) idempotent, and (2) also closes the underlying
-port if PORT is a TLS session record port."
- ;; FIXME: This is a partial workaround for <http://bugs.gnu.org/20145>,
- ;; because 'http-fetch' & co. may return a chunked input port whose 'close'
- ;; method calls 'close-port', not 'close-connection'.
+(define (close-connection port) ;deprecated
(unless (port-closed? port)
- (close-port port))
- (and=> (hashq-ref %tls-ports port)
- close-connection))
+ (close-port port)))
;; XXX: This is an awful hack to make sure the (set-port-encoding! p
;; "ISO-8859-1") call in `read-response' passes, even during bootstrap
diff --git a/guix/channels.scm b/guix/channels.scm
index 826ee729ad..f0261dc2da 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
@@ -36,7 +36,8 @@
#:use-module (guix i18n)
#:use-module ((guix utils)
#:select (source-properties->location
- &error-location))
+ &error-location
+ &fix-hint))
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-9)
@@ -457,6 +458,9 @@ INSTANCES."
(raise (apply make-compound-condition
(condition
(&message (message "'guix' channel is lacking")))
+ (condition
+ (&fix-hint (hint (G_ "Make sure your list of channels
+contains one channel named @code{guix} providing the core of Guix."))))
(if loc
(list (condition (&error-location (location loc))))
'())))))
diff --git a/guix/gexp.scm b/guix/gexp.scm
index cacc2bf183..8fea42c757 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -79,6 +79,9 @@
file-append-base
file-append-suffix
+ raw-derivation-file
+ raw-derivation-file?
+
load-path-expression
gexp-modules
@@ -265,6 +268,29 @@ The expander specifies how an object is converted to its sexp representation."
(with-monad %store-monad
(return drv)))
+;; Expand to a raw ".drv" file for the lowerable object it wraps. In other
+;; words, this gives the raw ".drv" file instead of its build result.
+(define-record-type <raw-derivation-file>
+ (raw-derivation-file obj)
+ raw-derivation-file?
+ (obj raw-derivation-file-object)) ;lowerable object
+
+(define-gexp-compiler raw-derivation-file-compiler <raw-derivation-file>
+ compiler => (lambda (obj system target)
+ (mlet %store-monad ((obj (lower-object
+ (raw-derivation-file-object obj)
+ system #:target target)))
+ ;; Returning the .drv file name instead of the <derivation>
+ ;; record ensures that 'lower-gexp' will classify it as a
+ ;; "source" and not as an "input".
+ (return (if (derivation? obj)
+ (derivation-file-name obj)
+ obj))))
+ expander => (lambda (obj lowered output)
+ (if (derivation? lowered)
+ (derivation-file-name lowered)
+ lowered)))
+
;;;
;;; File declarations.
@@ -1597,7 +1623,12 @@ imported modules in its search path. Look up EXP's modules in MODULE-PATH."
(chmod port #o555))))
#:system system
#:target target
- #:module-path module-path)))
+ #:module-path module-path
+
+ ;; These derivations are not worth offloading or
+ ;; substituting.
+ #:local-build? #t
+ #:substitutable? #f)))
(define* (gexp->file name exp #:key
(set-load-path? #t)
diff --git a/guix/git.scm b/guix/git.scm
index 83af596ef5..a12f1eec8e 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,11 +48,6 @@
git-checkout-url
git-checkout-branch))
-;; XXX: Use this hack instead of #:autoload to avoid compilation errors.
-;; See <http://bugs.gnu.org/12202>.
-(module-autoload! (current-module)
- '(git submodule) '(repository-submodules))
-
(define %repository-cache-directory
(make-parameter (string-append (cache-directory #:ensure? #f)
"/checkouts")))
@@ -200,11 +195,23 @@ dynamic extent of EXP."
(call-with-repository directory
(lambda (repository) exp ...)))
+(define (load-git-submodules)
+ "Attempt to load (git submodules), which was missing until Guile-Git 0.2.0.
+Return true on success, false on failure."
+ (match (false-if-exception (resolve-interface '(git submodule)))
+ (#f
+ (set! load-git-submodules (const #f))
+ #f)
+ (iface
+ (module-use! (resolve-module '(guix git)) iface)
+ (set! load-git-submodules (const #t))
+ #t)))
+
(define* (update-submodules repository
#:key (log-port (current-error-port)))
"Update the submodules of REPOSITORY, a Git repository object."
;; Guile-Git < 0.2.0 did not have (git submodule).
- (if (false-if-exception (resolve-interface '(git submodule)))
+ (if (load-git-submodules)
(for-each (lambda (name)
(let ((submodule (submodule-lookup repository name)))
(format log-port (G_ "updating submodule '~a'...~%")
diff --git a/guix/http-client.scm b/guix/http-client.scm
index 067002a79a..5a5a33b4c0 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -70,14 +70,13 @@
(define* (http-fetch uri #:key port (text? #f) (buffered? #t)
- keep-alive? (verify-certificate? #t)
+ (verify-certificate? #t)
(headers '((user-agent . "GNU Guile"))))
"Return an input port containing the data at URI, and the expected number of
bytes available or #f. If TEXT? is true, the data at URI is considered to be
textual. Follow any HTTP redirection. When BUFFERED? is #f, return an
-unbuffered port, suitable for use in `filtered-port'. When KEEP-ALIVE? is
-true, send a 'Connection: keep-alive' HTTP header, in which case PORT may be
-reused for future HTTP requests. HEADERS is an alist of extra HTTP headers.
+unbuffered port, suitable for use in `filtered-port'. HEADERS is an alist of
+extra HTTP headers.
When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates.
@@ -100,7 +99,11 @@ Raise an '&http-get-error' condition if downloading fails."
(setvbuf port 'none))
(let*-values (((resp data)
(http-get uri #:streaming? #t #:port port
- #:keep-alive? #t
+ ;; XXX: When #:keep-alive? is true, if DATA is
+ ;; a chunked-encoding port, closing DATA won't
+ ;; close PORT, leading to a file descriptor
+ ;; leak.
+ #:keep-alive? #f
#:headers headers))
((code)
(response-code resp)))
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index f3f1747e43..13771ec598 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -161,7 +161,10 @@ release."
;; alist of attributes.
(map (lambda (chunk)
(description->alist (string-join chunk "\n")))
- (chunk-lines (read-lines (http-fetch/cached url)))))))
+ (let* ((port (http-fetch/cached url))
+ (lines (read-lines port)))
+ (close-port port)
+ (chunk-lines lines))))))
(define* (latest-bioconductor-package-version name #:optional type)
"Return the version string corresponding to the latest release of the
@@ -206,7 +209,10 @@ from ~s: ~a (~s)~%"
(http-get-error-code c)
(http-get-error-reason c))
#f))
- (description->alist (read-string (http-fetch url))))))
+ (let* ((port (http-fetch url))
+ (result (description->alist (read-string port))))
+ (close-port port)
+ result))))
((bioconductor)
;; Currently, the bioconductor project does not offer a way to access a
;; package's DESCRIPTION file over HTTP, so we determine the version,
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 4c3f8000d0..405a26a877 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -231,10 +231,13 @@ latest version of CRATE-NAME."
string->license))
(append cargo-inputs cargo-development-inputs)))))
-(define (crate-recursive-import crate-name)
+(define* (crate-recursive-import crate-name #:optional version)
(recursive-import crate-name #f
- #:repo->guix-package (lambda (name repo)
- (crate->guix-package name))
+ #:repo->guix-package
+ (lambda (name repo)
+ (let ((version (and (string=? name crate-name)
+ version)))
+ (crate->guix-package name version)))
#:guix-name crate-name->package-name))
(define (guix-package->crate-name package)
diff --git a/guix/lint.scm b/guix/lint.scm
index cd2ea571ed..ed2f06bc64 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -26,7 +26,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix lint)
- #:use-module ((guix store) #:hide (close-connection))
+ #:use-module (guix store)
#:use-module (guix base32)
#:use-module (guix diagnostics)
#:use-module (guix download)
@@ -45,7 +45,8 @@
#:use-module (guix gnu-maintenance)
#:use-module (guix cve)
#:use-module ((guix swh) #:hide (origin?))
- #:autoload (guix git-download) (git-reference?)
+ #:autoload (guix git-download) (git-reference?
+ git-reference-url git-reference-commit)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
@@ -54,8 +55,7 @@
#:use-module ((guix build download)
#:select (maybe-expand-mirrors
(open-connection-for-uri
- . guix:open-connection-for-uri)
- close-connection))
+ . guix:open-connection-for-uri)))
#:use-module (web request)
#:use-module (web response)
#:use-module (srfi srfi-1)
@@ -286,11 +286,24 @@ of a package, and INPUT-NAMES, a list of package specifications such as
(let ((inputs (package-inputs package))
(input-names
'("pkg-config"
+ "autoconf"
+ "automake"
+ "bison"
"cmake"
+ "dejagnu"
+ "desktop-file-utils"
+ "doxygen"
"extra-cmake-modules"
+ "flex"
+ "gettext"
"glib:bin"
+ "gobject-introspection"
+ "googletest-source"
+ "groff"
+ "help2man"
"intltool"
"itstool"
+ "libtool"
"qttools"
"yasm" "nasm" "fasm"
"python-coverage" "python2-coverage"
@@ -302,7 +315,13 @@ of a package, and INPUT-NAMES, a list of package specifications such as
"python-pytest" "python2-pytest"
"python-pytest-cov" "python2-pytest-cov"
"python-setuptools-scm" "python2-setuptools-scm"
- "python-sphinx" "python2-sphinx")))
+ "python-sphinx" "python2-sphinx"
+ "swig"
+ "qmake"
+ "qttools"
+ "texinfo"
+ "xorg-server-for-tests"
+ "yelp-tools")))
(map (lambda (input)
(make-warning
package
@@ -453,7 +472,7 @@ for connections to complete; when TIMEOUT is #f, wait as long as needed."
(force-output port)
(read-response port))
(lambda ()
- (close-connection port))))
+ (close-port port))))
(case (response-code response)
((302 ; found (redirection)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a853ac6c7d..bf307d1421 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -43,10 +43,10 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-37)
- #:autoload (gnu packages) (specification->package %package-module-path)
+ #:use-module (gnu packages)
#:autoload (guix download) (download-to-store)
- #:autoload (guix git-download) (git-reference?)
- #:autoload (guix git) (git-checkout?)
+ #:autoload (guix git-download) (git-reference? git-reference-url)
+ #:autoload (guix git) (git-checkout git-checkout? git-checkout-url)
#:use-module ((guix status) #:select (with-status-verbosity))
#:use-module ((guix progress) #:select (current-terminal-columns))
#:use-module ((guix build syscalls) #:select (terminal-columns))
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 3f20a2e192..ab7c13315f 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +22,9 @@
#:use-module (guix store)
#:use-module (guix store roots)
#:autoload (guix build syscalls) (free-disk-space)
- #:autoload (guix profiles) (generation-profile)
+ #:autoload (guix profiles) (generation-profile
+ profile-generations
+ generation-number)
#:autoload (guix scripts package) (delete-generations)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm
index 92034dab3c..d834518c18 100644
--- a/guix/scripts/import/crate.scm
+++ b/guix/scripts/import/crate.scm
@@ -100,7 +100,7 @@ Import and convert the crate.io package for PACKAGE-NAME.\n"))
`(define-public ,(string->symbol name)
,pkg))
(_ #f))
- (crate-recursive-import name))
+ (crate-recursive-import name version))
(let ((sexp (crate->guix-package name version)))
(unless sexp
(leave (G_ "failed to download meta-data for package '~a'~%")
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index b84e37cbf2..c8d8546e29 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
@@ -29,7 +29,9 @@
#:use-module ((guix status) #:select (with-status-verbosity))
#:use-module ((guix self) #:select (make-config.scm))
#:use-module (guix grafts)
- #:autoload (guix inferior) (inferior-package?)
+ #:autoload (guix inferior) (inferior-package?
+ inferior-package-name
+ inferior-package-version)
#:use-module (guix monads)
#:use-module (guix modules)
#:use-module (guix packages)
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index 8fb67f9268..71a349d2fe 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -51,7 +51,9 @@
#:use-module (guix store)
#:use-module ((guix serialization) #:select (write-file))
#:use-module (guix zlib)
- #:autoload (guix lzlib) (lzlib-available?)
+ #:autoload (guix lzlib) (lzlib-available?
+ call-with-lzip-output-port
+ make-lzip-output-port)
#:use-module (guix cache)
#:use-module (guix ui)
#:use-module (guix scripts)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 04cc51829d..cb1be989e1 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -33,7 +33,9 @@
#:use-module (guix memoization)
#:use-module (guix monads)
#:use-module (guix channels)
- #:autoload (guix inferior) (open-inferior)
+ #:autoload (guix inferior) (open-inferior
+ inferior-available-packages
+ close-inferior)
#:use-module (guix scripts build)
#:autoload (guix build utils) (which)
#:use-module ((guix build syscalls)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 7eca2c6874..3bf9b8735f 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;;
@@ -20,7 +20,7 @@
(define-module (guix scripts substitute)
#:use-module (guix ui)
- #:use-module ((guix store) #:hide (close-connection))
+ #:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix combinators)
#:use-module (guix config)
@@ -37,7 +37,6 @@
#:select (uri-abbreviation nar-uri-abbreviation
(open-connection-for-uri
. guix:open-connection-for-uri)
- close-connection
store-path-abbreviation byte-count->string))
#:use-module (guix progress)
#:use-module ((guix build syscalls)
@@ -556,7 +555,7 @@ initial connection on which HTTP requests are sent."
;; Note that even upon "Connection: close", we can read from BODY.
(match (assq 'connection (response-headers resp))
(('connection 'close)
- (close-connection p)
+ (close-port p)
(connect #f ;try again
(append tail (drop requests processed))
result))
diff --git a/guix/ui.scm b/guix/ui.scm
index 540671f3dd..023e604085 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
@@ -494,7 +494,7 @@ See the \"Application Setup\" section in the manual, for more info.\n")))))
"Display version information for COMMAND and `(exit 0)'."
(simple-format #t "~a (~a) ~a~%"
command %guix-package-name %guix-version)
- (format #t "Copyright ~a 2019 ~a"
+ (format #t "Copyright ~a 2020 ~a"
;; TRANSLATORS: Translate "(C)" to the copyright symbol
;; (C-in-a-circle), if this symbol is available in the user's
;; locale. Otherwise, do not translate "(C)"; leave it as-is. */
diff --git a/guix/utils.scm b/guix/utils.scm
index 728039fbf0..3e8e59b8dc 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
@@ -31,16 +31,13 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-39)
- #:use-module (ice-9 binary-ports)
#:use-module (ice-9 ftw)
- #:autoload (rnrs io ports) (make-custom-binary-input-port)
+ #:use-module (rnrs io ports) ;need 'port-position' etc.
#:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
#:use-module (guix memoization)
#:use-module ((guix build utils) #:select (dump-port mkdir-p delete-file-recursively))
#:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync))
#:use-module (ice-9 format)
- #:autoload (ice-9 popen) (open-pipe*)
- #:autoload (ice-9 rdelim) (read-line)
#:use-module (ice-9 regex)
#:use-module (ice-9 match)
#:use-module (ice-9 format)