GNU bug report logs - #27275
[PATCH 0/2] Add (guix git) module.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Wed, 7 Jun 2017 12:05:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 27275 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 27275 <at> debbugs.gnu.org
Subject: Re: bug#27275: [PATCH 1/2] pull: Add a dependency to guile-git.
Date: Thu, 08 Jun 2017 22:52:54 +0200
Hello!

Mathieu Othacehe <m.othacehe <at> gmail.com> 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 <m.othacehe <at> gmail.com>
> 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’.




This bug report was last modified 8 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.