Skip to content

General fixupPhase patchShebangs strategy is in conflict with OS X (and BSD flavor) for wrapped interpreter #2146

@wavewave

Description

@wavewave

A stdenv derivation replaces shebang line in shell scripts during fixupPhase. Current strategy is that when this meets #!/usr/bin/env (interpreter command), it replaces the whole line with actual command for the interpreter. Therefore, for example, the first line of a python script starting with

#!/usr/bin/env python

is changed to

#!/nix/store/....-python-2.7.6-wrapper/bin/python

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.
A relevant link is here:
http://www.in-ulm.de/~mascheck/various/shebang/#interpreter-script

I suggest to keep /usr/bin/env as /nix/store/...-coreutils-../bin/env when being replaced by patchShebangs during fixupPhase

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: darwinRunning or building packages on Darwin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions