Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patchShebangs: don't remove ".../bin/env" (fixes NixOS#2146)
FIXME: The linux kernel limits the shebang to 128 bytes ("#define BINPRM_BUF_SIZE 128"), which is too small for "/nix/store/.../env /nix/store/.../interpreter". Currently, something like "/usr/bin/env python" is changed into "/nix/store/<hash>/bin/python" ("env" is removed). This works in linux systems, but does not work on BSD flavored systems like OS X since they do not allow another shell script to play a role as an interpreter. (Interpreters built with nixpkgs are typically shell script wrappers for the real interpreter binaries.) The new behaviour is to rewrite "/usr/bin/env python" to "/nix/store/<hash>/bin/env /nix/store/<hash>/bin/python".
- Loading branch information