Ludovic Courtès 015f17e8b9
derivations: Introduce 'read-derivation-from-file'.
This avoids the open/fstat/close syscalls upon a cache hit that we had
with the previous idiom:

  (call-with-input-file file read-derivation)

where caching happened in 'read-derivation' itself.

* guix/derivations.scm (%read-derivation): Rename to...
(read-derivation): ... this.
(read-derivation-from-file): New procedure.
(derivation-prerequisites, substitution-oracle)
(derivation-prerequisites-to-build):
(derivation-path->output-path, derivation-path->output-paths):
(derivation-path->base16-hash, map-derivation): Use
'read-derivation-from-file' instead of (call-with-input-file …
read-derivation).
* guix/grafts.scm (item->deriver): Likewise.
* guix/scripts/build.scm (log-url, options->things-to-build): Likewise.
* guix/scripts/graph.scm (file->derivation): Remove.
(derivation-dependencies, %derivation-node-type): Use
'read-derivation-from-file' instead.
* guix/scripts/offload.scm (guix-offload): Likewise.
* guix/scripts/perform-download.scm (guix-perform-download): Likewise.
* guix/scripts/publish.scm (load-derivation): Remove.
(narinfo-string): Use 'read-derivation-from-file'.
2017-06-12 17:53:51 +02:00
..
2017-01-28 18:55:20 +01:00
2017-05-03 23:50:15 +02:00
2017-03-18 00:38:41 +01:00
2015-01-26 21:58:12 +01:00
2017-06-09 09:48:26 +02:00
2017-05-03 16:16:17 +02:00
2017-05-11 16:17:49 +02:00
2017-05-03 16:16:17 +02:00
2017-06-03 17:35:49 +02:00
2017-05-03 16:16:17 +02:00
2017-04-17 23:31:28 +02:00
2015-01-11 23:50:01 +01:00
2017-06-12 17:53:51 +02:00
2017-05-03 16:16:17 +02:00
2017-05-28 23:13:39 +02:00