unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 52699-done@debbugs.gnu.org
Subject: bug#52699: [PATCH] gnu: Add nar-herder.
Date: Tue, 21 Dec 2021 11:23:29 +0000	[thread overview]
Message-ID: <875yrii4jy.fsf@cbaines.net> (raw)
In-Reply-To: <87pmpq6x0n.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Hello!
>
> Christopher Baines <mail@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

      reply	other threads:[~2021-12-21 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 10:27 [bug#52699] [PATCH] gnu: Add nar-herder Christopher Baines
2021-12-21 11:02 ` Ludovic Courtès
2021-12-21 11:23   ` Christopher Baines [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yrii4jy.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=52699-done@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).