Subject: bug#27275: [PATCH 1/2] pull: Add a dependency to guile-git.

From: [email-masked] (Ludovic Courtès)
Date: Thu, 08 Jun 2017 22:52:54 +0200

Hello!

Mathieu Othacehe <[email-masked]> skribis:

> I attached the patch I come up with. It's working ok :)
> I have a shorter version using match :
>
> (letrec-syntax ((maybe-load-paths
>                  (syntax-rules ()
>                    ((_ item rest ...)
>                     (let ((tail (maybe-load-paths rest ...)))
>                       (if (string? item)
>                           (match tail
>                             ((load-path load-compiled-path)
>                             (list
>                              (cons (string-append item
>                                                   "/share/guile/site/"
>                                                   #$(effective-version))
>                                    load-path)
>                              (cons (string-append item
>                                                   "/lib/guile/"
>                                                   #$(effective-version)
>                                                   "/site-ccache")
>                                    load-compiled-path))))
>                           tail)))
>                    ((_)
>                     '(() ())))))
>   (match (maybe-load-paths #$guile-json #$guile-ssh
>                            #$guile-git #$guile-bytestructures)
>     ((module-load-path module-load-compiled-path)
>      (set! %load-path (append module-load-path %load-path)
>      (set! %load-compiled-path (append module-load-compiled-path %load-compiled-path))))))
>
> It might seems preferable but I can't get guix-latest derivation to
> include (ice-9 match), maybe because of #:module-path in
> "(gexp->derivation "guix-latest" ...".

Hmm (ice-9 match) should always be found, but don’t add it to the
#:modules argument of ‘gexp->derivation’.

> From 1130f8eafdb27216fc542bff253a940528bedc6a Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <[email-masked]>
> Date: Wed, 7 Jun 2017 13:44:47 +0200
> Subject: [PATCH 2/2] pull: Add a dependency to guile-git.
>
> * build-aux/build-self.scm (guile-git, guile-bytestructures): New
>   variables.
>   (build): Add guile-git and guile-bytestructures to %load-path and
>   %load-compiled-path.

OK for this or the variant that uses ‘match’.

Thanks!

Ludo’.