guix-devel/guix/scripts
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
..
container
import
archive.scm
authenticate.scm
build.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
challenge.scm
container.scm
copy.scm
download.scm
edit.scm
environment.scm
gc.scm syscalls: Provide 'free-disk-space'. 2017-06-02 18:47:07 +02:00
graph.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
hash.scm
import.scm
lint.scm guix: lint: Slightly simplify `check-source-file-name'. 2017-05-23 04:35:06 +05:30
offload.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
pack.scm
package.scm guix package: Swallow EPIPE upon 'guix package --list-generations'. 2017-05-23 23:57:28 +02:00
perform-download.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
publish.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
pull.scm
refresh.scm scripts: refresh: Add -m manifest option. 2017-06-04 09:07:43 +02:00
size.scm
substitute.scm substitute: Do not display the installed size. 2017-06-02 18:47:07 +02:00
system.scm bootloader: Rename boot-name to bootloader-name. 2017-06-10 18:32:11 +02:00