~ruther/guix-local

be058c00870ef6c4837479f4b9043d72f8425ebc — Rutherther 29 days ago 9e3feb0 cuirass-guix
ci: Use (guix channels) to build guix specification.

This allows for the same guix being built as the one built by guix pull.
Full profile is built with all the channels specified in the specification.

* gnu/ci.scm
(guix-jobs): Use instances instead of channel with checkout url.
(cuirass-jobs): Recompute channel-instance for each channel.
* guix/channels.scm: Export channel-instance.

Closes: guix/cuirass#115
Change-Id: Ib003d22bdabe9751c92cb716483ca1138f809494
2 files changed, 18 insertions(+), 9 deletions(-)

M gnu/ci.scm
M guix/channels.scm
M gnu/ci.scm => gnu/ci.scm +17 -9
@@ 230,19 230,14 @@ SYSTEM."
              (remove (either from-32-to-64? same? pointless?)
                      (targets))))

(define* (guix-jobs store systems #:key source commit)
(define* (guix-jobs store systems #:key instances)
  "Return a list of jobs for Guix itself."
  (define build
    (primitive-load (string-append source "/build-aux/build-self.scm")))

  (map
   (lambda (system)
     (let ((name (string->symbol
                  (string-append "guix." system)))
           (drv (run-with-store store
                  (build source #:version commit #:system system
                         #:pull-version 1
                         #:guile-version "2.2"))))
                  (channel-instances->derivation instances))))
       (derivation->job name drv)))
   systems))



@@ 502,6 497,20 @@ names, for each one of SYSTEMS."
    (let ((channels (assq-ref arguments 'channels)))
      (map sexp->channel channels)))

  (define channel-specs
    (let ((channels (assq-ref arguments 'channel-specs)))
      (map sexp->channel channels)))

  (define instances
    (map
     (match-lambda
       ((channel-checkout channel-spec)
        (channel-instance
         channel-spec
         (channel-commit channel-checkout)
         (channel-url channel-checkout))))
     (zip channels channel-specs)))

  (define guix
    (find guix-channel? channels))



@@ 549,8 558,7 @@ names, for each one of SYSTEMS."
         ('guix
          ;; Build Guix modules only.
          (guix-jobs store systems
                     #:source source
                     #:commit commit))
                     #:instances instances))
         ('hello
          ;; Build hello package only.
          (let ((hello (specification->package "hello")))

M guix/channels.scm => guix/channels.scm +1 -0
@@ 87,6 87,7 @@
            guix-channel?
            repository->guix-channel

            channel-instance
            channel-instance?
            channel-instance-channel
            channel-instance-commit