-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
perl: use perl-cross to enable cross-compilation (native build unchanged) #33578
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
Conversation
|
||
meta = { | ||
homepage = https://arsv.github.io/perl-cross; | ||
description = "Cross-compilation standard implementation of the Perl 5 programmming language"; |
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 makes it sound like a separate implementation of Perl. But it's only a configure script + Makefiles to be used with standard Perl.
How about this, taken from the their github page: "Configure and build perl with a cross-compiling toolchain".
pkgs/top-level/all-packages.nix
Outdated
if stdenv.buildPlatform == stdenv.hostPlatform | ||
then (callPackages ../development/interpreters/perl {}) | ||
else (callPackages ../development/interpreters/perl-cross {}) | ||
) perl perl522 perl524 perl526; |
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.
Is it too bold to make the perl-cross build system overlay the default build environment for native too? (In any case, it can wait, I'm just curious.)
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.
I like the idea of merging them, and just pushed fixes that get this working by (among other minor fixes) grabbing most of the existing expression.
I don't think using it by default will go over well-- I thought this came up before but can't find the discussion now...
Of course it would be convenient if we could use the same for both!
bf4af04
to
9ba6c76
Compare
perl522 = common { | ||
perlVersion = "5.22.2"; | ||
perlVersion = "5.22.4"; | ||
perlSha256 = "1yk1xn4wmnrf2ph02j28khqarpyr24qwysjzkjnjv7vh5dygb7ms"; |
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.
Does this hash need an update?
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.
Good catch!
After investigating, the answer is actually "no"--it's just that the original hash from the earlier commit
was from 5.22.4 not 5.22.2. This hash matches the one we're using for this version in the 'normal' perl expression.
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.
(and I just refetched and confirmed, for some reason the download went realllyyyy slow)
Tested that native hash doesn't change, and still builds successfully for cross on raspberryPi and aarch64. EDIT: squashed! cc @Ericson2314 |
263c701
to
74e1dc3
Compare
Cool! well merge in a second. |
74e1dc3
to
8ebb907
Compare
Motivation for this change
Get perl cross-compiling!
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)