Re: [PATCH] global: resolve Perl executable via PATH
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Apr 5, 2023, 18:28 UTC
- Message-ID
- <733d4a0a-d544-4e25-80af-45d9551ab034@app.fastmail.com>
- In-Reply-To
- <d9cfad7caf9ff5bf88eb06cf7bb3be5e70e6d96f.1680689378.git.ps@pks.im>
On Wed, Apr 5, 2023, at 12:10, Patrick Steinhardt wrote:
Show 12 quoted lines
> The majority of Perl scripts we carry in Git have a `#!/usr/bin/perl` > shebang. This is not a portable location for the Perl interpreter and > may thus break on some systems that have the interpreter installed in a > different location. One such example is NixOS, where the only executable > installed in `/usr/bin` is env(1). > > Convert the shebangs to resolve the location of the Perl interpreter via > env(1) to make these scripts more portable. While the location of env(1) > is not guaranteed by any standard either, in practice all distributions > including NixOS have it available at `/usr/bin/env`. We're also already > using this idiom in a small set of other scripts, and until now nobody > complained about them.
This is great. I love to see efforts towards portability, and particularly when it benefits NixOS (as well).
-- Kristoffer Haugsbakk