Issue description
Executables produced by buildPerlModule use the shebang as a way of injecting dependent module paths. This goes over the shebang character limit which results in the shebang being ignored. On Darwin, the limit appears to be 512 characters. See my investigation here.
Steps to reproduce
- Be using MacOS
- Make
default.nix:
rec {
pkgsOriginal = import <nixpkgs> {};
pkgs = import (pkgsOriginal.fetchzip {
url = "https://github.com/NixOS/nixpkgs/archive/1869e7e5b0580e9398529dbebde7e983193c445e.zip";
sha256 = "00cnbmfnznbjlw95cmiarns2qy4w4z0lkp07rxz6jfhk78vkv8yv";
}) {};
biber = pkgs.biber;
}
- Run:
nix-build -A biber
result/bin/biber
- See output (file parsed by Bash):
result/bin/biber: line 3: use: command not found
result/bin/biber: line 4: use: command not found
result/bin/biber: line 5: use: command not found
result/bin/biber: line 7: use: command not found
result/bin/biber: line 8: EXIT_OK: command not found
result/bin/biber: line 9: EXIT_ERROR: command not found
result/bin/biber: line 10: syntax error near unexpected token `}'
result/bin/biber: line 10: `};'
- How many characters is the shebang?
$ head -n 1 result/bin/biber | wc -c
17370
Technical details
- system:
"x86_64-darwin"
- host os:
Darwin 17.4.0, macOS 10.13.3
- multi-user?:
yes
- sandbox:
no
- version:
nix-env (Nix) 1.11.16
- channels(root):
"nixpkgs-18.03pre126880.360e0195500"
- nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixpkgs
Issue description
Executables produced by
buildPerlModuleuse the shebang as a way of injecting dependent module paths. This goes over the shebang character limit which results in the shebang being ignored. On Darwin, the limit appears to be 512 characters. See my investigation here.Steps to reproduce
default.nix:$ head -n 1 result/bin/biber | wc -c 17370Technical details
"x86_64-darwin"Darwin 17.4.0, macOS 10.13.3yesnonix-env (Nix) 1.11.16"nixpkgs-18.03pre126880.360e0195500"/nix/var/nix/profiles/per-user/root/channels/nixpkgs