Closed christian-blades-cb closed 3 years ago
This appears to only be a problem in macos, I can't reproduce the issue on linux.
macOS doesn't allow scripts that use a script as an interpreter. See https://github.com/doronbehar/rfcs/blob/declarative-wrappers/rfcs/0075-declarative-wrappers.md for an effort to fix this.
The problem
Looks like in recent versions of nixpkgs,
${php}/bin/php
is a shell script wrapping the actual php binary. The consequence is that it's not usable as a shebang in this state, and we can't build composer2nix.Proposed solution
Call the two php scripts in
composer-env.nix
via the php interpreter instead of relying on the shebang.