all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 67822@debbugs.gnu.org, Andreas Enge <andreas@enge.fr>,
	Lars Bilke <lars.bilke@ufz.de>, Eric Bavier <bavier@posteo.net>
Subject: [bug#67822] [PATCH v3] gnu: maths: petsc: Reduce closure size.
Date: Mon, 08 Jan 2024 18:20:07 +0100	[thread overview]
Message-ID: <87zfxf3fp4.fsf@gnu.org> (raw)
In-Reply-To: <ZZpqX6OYjXu-lfB9@3900XT> (Efraim Flashner's message of "Sun, 7 Jan 2024 11:09:51 +0200")

Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Fri, Jan 05, 2024 at 12:52:02PM +0100, Lars Bilke wrote:
>> Hi Ludo,
>> 
>> On 5 Jan 2024, at 12:08, Ludovic Courtès wrote:
>> 
>> > Can we instead patch the thing that creates ‘petscvariables’ in the
>> > first place?
>> >
>> > The reason I’m suggesting it is because in general we avoid hardcoding
>> > /gnu/store in substitution patterns because it’s possible to configure
>> > Guix with a different store directory.
>> 
>> Thanks for your feedback!
>> 
>> In v1 of this patch I removed the 'petscvariables'-file completely but this broke dependent packages as well as not-yet packaged projects which use the file for finding the PETSc library and configuriung their build system.
>> 
>> Is there a possibility to replace the hard-coded /gnu/store with a variable which evaluates to the current store directory?
>
> There's %store-directory in (guix build utils).  In fact, it looks like
> git might have some code that you can borrow.

Yes.  However, I think we should use literal strings for patterns in
‘substitute*’.  That is, I would avoid:

  (substitute* …
    (((string-append (%store-directory) "/bin/whatever"))
     …))

in favor of, say:

  (substitute* …
    (("([[:graph:]]+)/bin/whatever")
      …))

This is to make things easier to understand, 100% correct (in theory we
should use ‘regexp-quote’ when turning strings into regexps), and to
leave room for how ‘substitute*’ is implemented.

Thanks,
Ludo’.




  reply	other threads:[~2024-01-08 17:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 12:56 [bug#67822] [PATCH] gnu: maths: petsc: Reduce closure size Lars Bilke
2023-12-14 14:53 ` [bug#67822] [PATCH v2] " Lars Bilke
2023-12-15  8:55 ` [bug#67822] [PATCH v3] " Lars Bilke
2024-01-05 11:08   ` Ludovic Courtès
2024-01-05 11:52     ` Lars Bilke
2024-01-07  9:09       ` Efraim Flashner
2024-01-08 17:20         ` Ludovic Courtès [this message]
2024-01-09 18:15 ` [bug#67822] [PATCH v4] " Lars Bilke
2024-02-27  7:49   ` Lars Bilke
2024-02-27  9:50   ` bug#67822: " Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=87zfxf3fp4.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=67822@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=bavier@posteo.net \
    --cc=efraim@flashner.co.il \
    --cc=lars.bilke@ufz.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.