GNU bug report logs - #52699
[PATCH] gnu: Add nar-herder.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Tue, 21 Dec 2021 10:28:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 52699-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 52699-done <at> debbugs.gnu.org
Subject: Re: bug#52699: [PATCH] gnu: Add nar-herder.
Date: Tue, 21 Dec 2021 11:23:29 +0000
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello!
>
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> * gnu/packages/package-management.scm (nar-herder): New variable.
>
> [...]
>
>> +           (add-before 'build 'set-GUILE_AUTO_COMPILE
>> +             (lambda _
>> +               ;; To avoid warnings relating to 'guild'.
>> +               (setenv "GUILE_AUTO_COMPILE" "0")
>> +               #t))
>
> You can omit trailing #t’s.
>
>> +           (add-after 'install 'wrap-executable
>> +             (lambda* (#:key inputs outputs target #:allow-other-keys)
>> +               (let* ((out (assoc-ref outputs "out"))
>> +                      (bin (string-append out "/bin"))
>> +                      (guile (assoc-ref inputs "guile"))
>> +                      (version (target-guile-effective-version))
>> +                      (scm (string-append out "/share/guile/site/" version))
>> +                      (go  (string-append out "/lib/guile/" version "/site-ccache")))
>> +                 (for-each
>> +                  (lambda (file)
>> +                    (simple-format (current-error-port) "wrapping: ~A\n" file)
>> +                    (let ((guile-inputs (list
>> +                                         "guile-json"
>> +                                         "guile-gcrypt"
>> +                                         "guix"
>> +                                         "guile-lib"
>> +                                         "guile-sqlite3"
>> +                                         "gnutls"
>> +                                         "guile-fibers")))
>> +                      (wrap-program file
>> +                        `("GUILE_LOAD_PATH" ":" prefix
>> +                          (,scm ,(string-join
>> +                                  (map (lambda (input)
>> +                                         (simple-format
>> +                                          #f "~A/share/guile/site/~A"
>> +                                          (assoc-ref inputs input)
>> +                                          version))
>> +                                       guile-inputs)
>> +                                  ":")))
>> +                        `("GUILE_LOAD_COMPILED_PATH" ":" prefix
>> +                          (,go ,(string-join
>> +                                 (map (lambda (input)
>> +                                        (simple-format
>> +                                         #f "~A/lib/guile/~A/site-ccache"
>> +                                         (assoc-ref inputs input)
>> +                                         version))
>> +                                      guile-inputs)
>> +                                 ":"))))))
>
> I’d use ‘string-append’ rather than ‘format’.
>
> (It’d be nice to have a streamlined solution to wrap those Guile
> executables…)
>
>> +      (license license:gpl3+))))
>
> I believe it’s ‘agpl3+’ (though GPLv3+ would make it easier to share
> code with Guix; something worth considering).
>
> Otherwise LGTM, thanks!

Thanks for taking a look! I've pushed as
6f76678cb7575072395198c343a9fecc52839513 with the changes you mentioned
above.

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 149 days ago.

Previous Next


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