Skip to content
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

elixir: use env shebang only on Darwin #372297

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

wh0
Copy link
Contributor

@wh0 wh0 commented Jan 9, 2025

The mix program from the elixir package has a long shebang:

#!/nix/store/b1wvkjx96i3s7wblz38ya0zr8i93zbc5-coreutils-9.5/bin/env /nix/store/mhm5dbd3lxhndrz5rcnl383jpp2k6xqq-elixir-1.17.3/bin/elixir

136 characters. Historical PR comments note that we include the env invocation even though we give an exact binary path because Darwin won't use another interpreted script as this program's interpreter.

I'm working on improving compatibility with older Linux kernels, which have a limit of 127 characters in the shebang command. This PR removes the env command other than in Darwin, which will bring us well under 127 characters.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/) <- kind of, only mix
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@wh0
Copy link
Contributor Author

wh0 commented Jan 9, 2025

GitHub Actions has encountered an internal error when running your job.

I guess I'll try flipping the draft mode on and off

@wh0 wh0 marked this pull request as draft January 9, 2025 21:05
@wh0 wh0 marked this pull request as ready for review January 9, 2025 21:05
@wh0
Copy link
Contributor Author

wh0 commented Jan 9, 2025

Requesting reviews from code owners
This PR touches 1 files
File pkgs/development/interpreters/elixir/generic-builder.nix is unowned

possibly unrelated problem. but the file is beam-related.

@happysalada can you review?

@happysalada
Copy link
Contributor

This looks good, but all the checks seem to be failing. Can you rebase on master to see if this is just a temporary error ?

@wh0
Copy link
Contributor Author

wh0 commented Jan 10, 2025

oh staging has moved a little, so I maybe it'll be enough to rebase on that

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jan 10, 2025
@happysalada happysalada merged commit 9017ae3 into NixOS:staging Jan 10, 2025
23 of 27 checks passed
@wh0
Copy link
Contributor Author

wh0 commented Jan 11, 2025

thanks!

@wh0 wh0 deleted the elixir-shebang branch January 11, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: erlang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants