New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
itstool: fix double-shebang issue on macOS #74942
Conversation
We need a generic solution for this and should not be fixing individual packages. cc @NixOS/darwin-maintainers any ideas? Maybe a darwin-specific hook that patches all shebangs to prefix |
Would fix #73762 |
# wrapper, which is perfectly happy to execute an interpreted script. | ||
# | ||
# However, we don't want to do this on Linux, which only allows one argument | ||
# in a shebang. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like something we can update in patch-shebangs.sh. I didn't realize that /usr/bin/env worked differently! For instance, skipping it here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/patch-shebangs.sh#L64
I think this is what is blocking the nixpkgs-20.03-darwin channel: |
Would just patching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a better fix for this using wrapPython
:
Please cherry-pick this commit instead: fa247de4d70015608f8f70a8192757da6595488f
@Mic92 That looks like the way to go to me. While I guess changing patchShebangs would work around this I'd much rather avoid double wrapping in general, it's rather ugly IMHO. |
Cherry-pick completed. Thanks! |
@GrahamcOfBorg build itstool |
Should this go to staging? |
Yes, it appears to rebuild the world (not just on darwin). I think we can stand a mass rebuild just on darwin though. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/go-no-go-meeting-nixos-20-03-markhor/6495/16 |
I haven't tried this on Linux, where it should have no effect, but it does make make libgda (which is failing on darwin) work correctly on my machine.