summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-30 23:47:49 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-30 23:47:49 +0200
commit8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e (patch)
tree6fa0f8ba32b83a996625bc188903ccebfb7e7c2c /guix/scripts
parent5d9e2187929ed7e8d46ec3cb3174fd78c1846360 (diff)
parent229f4fa9522fb56b014ee9c0d8111e8fb6da764d (diff)
downloadguix-patches-8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e.tar
guix-patches-8bf8cd9b85c85be387565f6c8ca9f6c72196fb8e.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/local.mk gnu/packages/backup.scm gnu/packages/emacs-xyz.scm gnu/packages/guile.scm gnu/packages/lisp.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/web.scm gnu/packages/xorg.scm
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/edit.scm7
-rw-r--r--guix/scripts/pack.scm33
-rwxr-xr-xguix/scripts/substitute.scm8
3 files changed, 24 insertions, 24 deletions
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index a6fd1d2751..43f3011869 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -56,10 +56,9 @@ Start $VISUAL or $EDITOR to edit the definitions of PACKAGE...\n"))
(show-bug-report-information))
(define %editor
- ;; XXX: It would be better to default to something more likely to be
- ;; pre-installed on an average GNU system. Since Nano is not suited for
- ;; editing Scheme, Emacs is used instead.
- (make-parameter (or (getenv "VISUAL") (getenv "EDITOR") "emacs")))
+ ;; Nano is sensible default, as it is installed by base system.
+ ;; For development, user can set custom value for $EDITOR.
+ (make-parameter (or (getenv "VISUAL") (getenv "EDITOR") "nano")))
(define (search-path* path file)
"Like 'search-path' but exit if FILE is not found."
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 4f72304e57..580f696b41 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1071,7 +1071,21 @@ Create a bundle of PACKAGE.\n"))
(localstatedir? (assoc-ref opts 'localstatedir?))
(entry-point (assoc-ref opts 'entry-point))
(profile-name (assoc-ref opts 'profile-name))
- (gc-root (assoc-ref opts 'gc-root)))
+ (gc-root (assoc-ref opts 'gc-root))
+ (profile (profile
+ (content manifest)
+
+ ;; Always produce relative symlinks for
+ ;; Singularity (see
+ ;; <https://bugs.gnu.org/34913>).
+ (relative-symlinks?
+ (or relocatable?
+ (eq? 'squashfs pack-format)))
+
+ (hooks (if bootstrap?
+ '()
+ %default-profile-hooks))
+ (locales? (not bootstrap?)))))
(define (lookup-package package)
(manifest-lookup manifest (manifest-pattern (name package))))
@@ -1085,22 +1099,7 @@ Create a bundle of PACKAGE.\n"))
to your package list.")))
(run-with-store store
- (mlet* %store-monad ((profile (profile-derivation
- manifest
-
- ;; Always produce relative
- ;; symlinks for Singularity (see
- ;; <https://bugs.gnu.org/34913>).
- #:relative-symlinks?
- (or relocatable?
- (eq? 'squashfs pack-format))
-
- #:hooks (if bootstrap?
- '()
- %default-profile-hooks)
- #:locales? (not bootstrap?)
- #:target target))
- (drv (build-image name profile
+ (mlet* %store-monad ((drv (build-image name profile
#:target
target
#:compressor
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 95b47a7816..ba2b2d2d4e 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -494,7 +494,8 @@ MAX-LENGTH first elements."
(loop (+ 1 len) tail (cons head result)))))))
(define* (http-multiple-get base-uri proc seed requests
- #:key port (verify-certificate? #t))
+ #:key port (verify-certificate? #t)
+ (batch-size 1000))
"Send all of REQUESTS to the server at BASE-URI. Call PROC for each
response, passing it the request object, the response, a port from which to
read the response body, and the previous result, starting with SEED, à la
@@ -504,7 +505,7 @@ initial connection on which HTTP requests are sent."
(requests requests)
(result seed))
(define batch
- (at-most 1000 requests))
+ (at-most batch-size requests))
;; (format (current-error-port) "connecting (~a requests left)..."
;; (length requests))
@@ -536,9 +537,10 @@ initial connection on which HTTP requests are sent."
(()
(match (drop requests processed)
(()
+ (close-port p)
(reverse result))
(remainder
- (connect port remainder result))))
+ (connect p remainder result))))
((head tail ...)
(let* ((resp (read-response p))
(body (response-body-port resp))