Since 03eaa48 added perl.withPackages, there is a canonical way to
create a perl interpreter from a list of libraries, for use in script
shebangs or generic build inputs. This method is declarative (what we
are doing is clear), produces short shebangs[1] and needs not to wrap
existing scripts.
Unfortunately there are a few exceptions that I've found:
1. Scripts that are calling perl with the -T switch. This makes perl
ignore PERL5LIB, which is what perl.withPackages is using to inform
the interpreter of the library paths.
2. Perl packages that depends on libraries in their own path. This
is not possible because perl.withPackages works at build time. The
workaround is to add `-I $out/${perl.libPrefix}` to the shebang.
In all other cases I propose to switch to perl.withPackages.
[1]: https://lwn.net/Articles/779997/
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/znapzend/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/i652pzxzq638dglzqh7p7afp9dilnfsy-znapzend-0.18.0/bin/znapzendzetup help’ got 0 exit code
- ran ‘/nix/store/i652pzxzq638dglzqh7p7afp9dilnfsy-znapzend-0.18.0/bin/znapzendztatz -h’ got 0 exit code
- ran ‘/nix/store/i652pzxzq638dglzqh7p7afp9dilnfsy-znapzend-0.18.0/bin/znapzendztatz --help’ got 0 exit code
- found 0.18.0 with grep in /nix/store/i652pzxzq638dglzqh7p7afp9dilnfsy-znapzend-0.18.0
- directory tree listing: https://gist.github.com/5bc48206cf2caa33654bb891da1fdf99