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.
This commit is contained in:
Ludovic Courtès 2017-01-05 21:49:45 +01:00
parent ec14d2157d
commit 6d943e553d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; 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. ;;; This file is part of GNU Guix.
;;; ;;;
@ -520,9 +520,9 @@ that form."
(define (write-input input port) (define (write-input input port)
(match input (match input
(($ <derivation-input> path sub-drvs) (($ <derivation-input> path sub-drvs)
(display "(" port) (display "(\"" port)
(write path port) (display path port)
(display "," port) (display "\"," port)
(write-string-list sub-drvs) (write-string-list sub-drvs)
(display ")" port)))) (display ")" port))))
@ -545,7 +545,7 @@ that form."
(write-list inputs write-input port) (write-list inputs write-input port)
(display "," port) (display "," port)
(write-string-list sources) (write-string-list sources)
(format port ",~s,~s," system builder) (simple-format port ",\"~a\",\"~a\"," system builder)
(write-string-list args) (write-string-list args)
(display "," port) (display "," port)
(write-list env-vars write-env-var port) (write-list env-vars write-env-var port)