aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-05 21:49:45 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-05 23:45:38 +0100
commit6d943e553d45280ec54f067a3e5e7f714fcd9ba1 (patch)
tree024c098171e6ab4ef429cca882e884d23fed700d
parentec14d2157d8e4c0caea6f912e041a78194b29a46 (diff)
downloadgnu-guix-6d943e553d45280ec54f067a3e5e7f714fcd9ba1.tar
gnu-guix-6d943e553d45280ec54f067a3e5e7f714fcd9ba1.tar.gz
derivations: Micro-optimize 'write-derivation'.
* guix/derivations.scm (write-derivation)[write-input]: Use 'display' instead of 'write' for PATH. Use 'simple-format' instead of 'format', and '~a' instead of '~s' for SYSTEM and BUILDER.
-rw-r--r--guix/derivations.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 7ed9bd61d3..23ad58f914 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -520,9 +520,9 @@ that form."
(define (write-input input port)
(match input
(($ <derivation-input> path sub-drvs)
- (display "(" port)
- (write path port)
- (display "," port)
+ (display "(\"" port)
+ (display path port)
+ (display "\"," port)
(write-string-list sub-drvs)
(display ")" port))))
@@ -545,7 +545,7 @@ that form."
(write-list inputs write-input port)
(display "," port)
(write-string-list sources)
- (format port ",~s,~s," system builder)
+ (simple-format port ",\"~a\",\"~a\"," system builder)
(write-string-list args)
(display "," port)
(write-list env-vars write-env-var port)