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
1 changed files with 5 additions and 5 deletions

View File

@ -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)