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
perlPackages.GitAutoFixup: fix too long shebang under darwin #116799
Conversation
pkgs/top-level/perl-packages.nix
Outdated
nativeBuildInputs = pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.shortenPerlShebang; | ||
postInstall = pkgs.lib.optionalString pkgs.stdenv.isDarwin '' |
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.
nativeBuildInputs = pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.shortenPerlShebang; | |
postInstall = pkgs.lib.optionalString pkgs.stdenv.isDarwin '' | |
nativeBuildInputs = lib.optional stdenv.isDarwin pkgs.shortenPerlShebang; | |
postInstall = lib.optionalString stdenv.isDarwin '' |
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.
Oopsie, thanks!
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.
Would it be OK to fixup!
this? (and squash+force-push it, that is)
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.
Yes pls (as long as it results in one commit matching CONTRIBUTING.md). Also, it would be great if you could change the attribute name in the commit message from perl-packages.GitAutoFixup
to perlPackages.GitAutoFixup
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.
Done and done!
change perl-packages.GitAutoFixup to perlPackages.GitAutoFixup
I was a bit confused about what to name it, since we use it as (e.g.) perl532Packages.***
, but this would also change the the other perl versions as well (e.g. perl530Packages.***
)!
Does the snake-case -> camelCase pattern apply to all top-level packages?
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.
Thx for the fixes.
perlPackages
always points to the latest maint version of perl, like perl532Packages
. I'm not sure there is a snake-case to camelCase rule tbh.
@SuperSandro2000 Can you test on darwin pls? My darwin machine is unavailable today :-/ |
Tested and works fine. |
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.
LGTM
Thanks for the contribution, and welcome to the NixOS project! :-)
Thank you for all the hand-holding! |
Motivation for this change
Similarly to #91419 and other, this package had a shebang line longer than 512 characters, making the invocation fail on OS X with an
exec format error
:zsh: /Users/aisamu/.nix-profile/bin/git-autofixup: bad interpreter: /nix/store/f18m26x5d7xywdx12ni631j79d5k1kjw-perl-5.32.0/bin/perl -I/nix/store/f18m26x5d7xywdx12ni631j79d5k1kjw-perl-5.32.0/lib: exec format error
Things done
./result/bin/
)