Subject: [bug#54304] [PATCH] Don't fix git executable location during Elixir build

From: Ludovic Courtès <[email-masked]>
Date: Fri, 11 Mar 2022 22:51:59 +0100

Hi,

Cees de Groot <[email-masked]> skribis:

> On Wednesday, March 9th, 2022 at 16:49, Tobias Geerinckx-Rice <[email-masked]> wrote:
>> If BEAM somehow obfuscates store references we'll have to find a similar work-around to stop it. Let us know what you find.
>>
> Yup. BEAM files have literals stored in a single Deflated blob (https://beam-wisdoms.clau.se/en/latest/indepth-beam-file.html). So the scanning won't work.

If we know what set of store references go in those blogs, we could
create a text file or something in #$output whose sole purpose is to
keep a reference to those store items.

For example, if we know those BEAM files contain a reference to Git, we
can add a phase like:

  (lambda* (#:key inputs outputs #:allow-other-keys)
    (symlink (search-input-file inputs "git")
             (string-append (assoc-ref output "out")
                            "/libexec/elixir/.git")))

That way the GC will keep Git around.

Thoughts?

Ludo’.