help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch '/usr/bin/env -S' shebangs


From: Olivier Dion
Subject: Patch '/usr/bin/env -S' shebangs
Date: Mon, 02 May 2022 12:03:01 -0400

Hi all,

I have a couple of scripts -- that are not to be installed -- in my
project.

These scripts all have the following shebang:
--8<---------------cut here---------------start------------->8---
#!/usr/bin/env -S guile --no-auto-compile -e main -s
--8<---------------cut here---------------end--------------->8---

Apparently, Guix can not patch these shebangs on its own, so I added the
following phase to my package's definition:
--8<---------------cut here---------------start------------->8---
(add-after 'unpack 'more-patch-source-shebangs
           (lambda _
             (substitute* '("pre-inst-env"
                            "tools/run-tests"
                            "tools/test-driver"
                            "tools/compile-scheme")
               (("/usr/bin/env") (which "env")))))
--8<---------------cut here---------------end--------------->8---

I'm wondering if this is the good thing to do?  Or maybe there's a more
clean alternative?

FYI, I added this phase before 'patch-source-shebangs to avoid
errors.

Regards,
old

-- 
Olivier Dion
oldiob.dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]