~ruther/guix-local

6ce206cb92ba803de7ff05410787f18ea7d37bae — Ludovic Courtès 12 years ago 200a97e
Prefer local builds for "small" derivations.

* gnu/system.scm (union, file-union, links): Pass #:local-build? #t to
  'derivation-expression'.
* guix/derivations.scm (imported-files, compiled-modules): Likewise.
* guix/profiles.scm (profile-derivation): Likewise.
3 files changed, 13 insertions(+), 7 deletions(-)

M gnu/system.scm
M guix/derivations.scm
M guix/profiles.scm
M gnu/system.scm => gnu/system.scm +7 -4
@@ 1,5 1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 152,7 152,8 @@ input tuples."
                           #:system system
                           #:inputs inputs
                           #:modules '((guix build union))
                           #:guile-for-build guile)))
                           #:guile-for-build guile
                           #:local-build? #t)))

(define* (file-union files
                     #:key (inputs '()) (name "file-union"))


@@ 190,7 191,8 @@ as an inputs; additional inputs, such as derivations, are taken from INPUTS."
                                         `(symlink ,target ,name)))
                                       files))

                             #:inputs inputs))))
                             #:inputs inputs
                             #:local-build? #t))))

(define (links inputs)
  "Return a directory with symbolic links to all of INPUTS.  This is


@@ 212,7 214,8 @@ directories or regular files."

  (mlet %store-monad ((inputs (lower-inputs inputs)))
    (derivation-expression "links" builder
                           #:inputs inputs)))
                           #:inputs inputs
                           #:local-build? #t)))

(define* (etc-directory #:key
                        (locale "C") (timezone "Europe/Paris")

M guix/derivations.scm => guix/derivations.scm +4 -2
@@ 836,7 836,8 @@ system, imported, and appears under FINAL-PATH in the resulting store path."
    (build-expression->derivation store name builder
                                  #:system system
                                  #:inputs files
                                  #:guile-for-build guile)))
                                  #:guile-for-build guile
                                  #:local-build? #t)))

(define* (imported-modules store modules
                           #:key (name "module-import")


@@ 902,7 903,8 @@ they can refer to each other."
    (build-expression->derivation store name builder
                                  #:inputs `(("modules" ,module-drv))
                                  #:system system
                                  #:guile-for-build guile)))
                                  #:guile-for-build guile
                                  #:local-build? #t)))

(define* (build-expression->derivation store name exp
                                       #:key

M guix/profiles.scm => guix/profiles.scm +2 -1
@@ 257,7 257,8 @@ the given MANIFEST."
                                              ;; already valid.
                                              `((,name ,path) ,@deps)))
                                            (manifest-entries manifest))
                                #:modules '((guix build union))))
                                #:modules '((guix build union))
                                #:local-build? #t))

(define (profile-regexp profile)
  "Return a regular expression that matches PROFILE's name and number."