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

perl536Packages: cross fixes #225086

Closed
wants to merge 27 commits into from
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1e5e07f
perl536Packages.AlienBuild: fix cross compilation
apfelkuchen6 Apr 7, 2023
94c7f43
perl536Packages.AlienLibxml2: fix cross compilation
apfelkuchen6 Apr 7, 2023
d920960
perl536Packages.BHooksEndOfScope: fix cross compilation
apfelkuchen6 Apr 7, 2023
07a1e66
perl536Packages.DateTimeLocale: fix cross compilation
apfelkuchen6 Apr 7, 2023
f47c6ed
perl536Packages.ExtUtilsLibBuilder: fix cross compilation
apfelkuchen6 Apr 7, 2023
c79370f
perl536Packages.FileShareDir: fix cross compilation
apfelkuchen6 Apr 7, 2023
ed7992f
perl536Packages.LinguaTranslit: fix cross compilation
apfelkuchen6 Apr 7, 2023
ce5532a
perl536Packages.ListMoreUtils: fix cross compilation
apfelkuchen6 Apr 7, 2023
3d771c6
perl536Packages.ListMoreUtilsXS: fix cross compilation
apfelkuchen6 Apr 7, 2023
9079c8d
perl536Packages.ListSomeUtils: fix cross compilation
apfelkuchen6 Apr 7, 2023
91bd17f
perl536Packages.ListUtilsBy: fix cross compilation
apfelkuchen6 Apr 7, 2023
ec2d9a1
perl536Packages.MIMECharset: fix cross compilation
apfelkuchen6 Apr 7, 2023
c4f36de
perl536Packages.ModuleBuild: fix cross compilation
apfelkuchen6 Apr 7, 2023
6f6e71c
perl536Packages.ModuleBuildTiny: fix cross compilation
apfelkuchen6 Apr 7, 2023
7b56eb9
perl536Packages.ModuleRuntime: fix cross compilation
apfelkuchen6 Apr 7, 2023
e734bc2
perl536Packages.TextCSV: fix cross compilation
apfelkuchen6 Apr 7, 2023
bdc3e59
perl536Packages.Testutf8: fix cross compilation
apfelkuchen6 Apr 7, 2023
283a2e6
perl536Packages.XMLLibXML: fix cross compilation
apfelkuchen6 Apr 7, 2023
716c4f9
perl536Packages.XMLLibXSLT: fix cross compilation
apfelkuchen6 Apr 7, 2023
ce6f7db
perl536Packages.XMLSAX: fix cross compilation
apfelkuchen6 Apr 7, 2023
ca3f8ba
perl536Packages.NetSSLeay: fix cross compilation
apfelkuchen6 Apr 7, 2023
2df1589
perl536Packages.PackageStash: fix cross compilation
apfelkuchen6 Apr 7, 2023
4bb10a7
perl536Packages.ParamsValidate: fix cross compilation
apfelkuchen6 Apr 7, 2023
791ad3a
perl536Packages.ParseRecDescent: fix cross compilation
apfelkuchen6 Apr 7, 2023
85ae63e
perl536Packages.Readonly: fix cross compilation
apfelkuchen6 Apr 7, 2023
154eb59
perl536Packages.TestLeakTrace: fix cross compilation
apfelkuchen6 Apr 7, 2023
b4f132a
perl536Packages.TextBibTeX: fix cross compilation
apfelkuchen6 Apr 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 48 additions & 5 deletions pkgs/top-level/perl-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ let
url = "mirror://cpan/authors/id/P/PL/PLICEASE/Alien-Build-2.37.tar.gz";
hash = "sha256-MAC8vphIJkP3a7z/zkL9SPJMY6ZFf4qiwWlfSBrJ7VE=";
};
nativeBuildInputs = [ buildPackages.perl ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should provide a comment to this hack and the assignment (which is an implicit override of perl.mini) should only be done for cross-compilation (to document the intention).

Copy link
Contributor Author

@apfelkuchen6 apfelkuchen6 Apr 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought process behind not guarding was "a full perl is also required for native builds, so this is just more explicit". On the other hand, guarding this with /nix/store/av8clvjy4d91ybmsc92lgaxnvlif4g6l-perl5.36.0-Alien-Build-2.37-i686-unknown-linux-gnu.drv also has the additional benefit that it doesn't change the evaluation for native builds, (hopefully) cutting down the number of rebuilds significantly. Will update.

Adding a simple comment like "when cross-compiling, buildPerlPackage only appends perl.mini to nativeBuildInputs, but this build needs a full perl" to each of these lines should be enough, right?
edit: the wording from your PR #222427 ("Override default intepreter perl.mini") is better

propagatedBuildInputs = [ CaptureTiny FFICheckLib FileWhich Filechdir PathTiny PkgConfig ];
buildInputs = [ DevelHide Test2Suite ];
meta = {
Expand Down Expand Up @@ -304,7 +305,7 @@ let
hash = "sha256-c7RSRPC1w25TMsM1abgqGrLDPiY/HQB4XSADvK7GjbM=";
};
strictDeps = true;
nativeBuildInputs = [ pkgs.pkg-config ];
nativeBuildInputs = [ buildPackages.perl buildPackages.pkg-config ];
propagatedBuildInputs = [ AlienBuild ];
buildInputs = [ pkgs.libxml2 MojoDOM58 SortVersions Test2Suite URI ];
meta = {
Expand Down Expand Up @@ -1585,6 +1586,7 @@ let
url = "mirror://cpan/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-0.24.tar.gz";
hash = "sha256-A6o9/l0KpkcalvQ/6DGBedGXlNSmQHCPAoj5IW7HrMY=";
};
nativeBuildInputs = [ buildPackages.perl ];
propagatedBuildInputs = [ ModuleImplementation SubExporterProgressive ];
meta = {
description = "Execute code after a scope finished compilation";
Expand Down Expand Up @@ -6406,6 +6408,7 @@ let
url = "mirror://cpan/authors/id/D/DR/DROLSKY/DateTime-Locale-1.28.tar.gz";
hash = "sha256-bGBNjFycJzm3jgU4pAIoO4Kx30GeYL7yCwSEPkWEut4=";
};
nativeBuildInputs = [ buildPackages.perl ];
buildInputs = [ CPANMetaCheck FileShareDirInstall IPCSystemSimple PathTiny Test2PluginNoWarnings Test2Suite TestFileShareDir ];
propagatedBuildInputs = [ FileShareDir ParamsValidationCompiler Specio namespaceautoclean ];
meta = {
Expand Down Expand Up @@ -8794,6 +8797,7 @@ let
url = "mirror://cpan/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-0.08.tar.gz";
hash = "sha256-xRFx4G3lMDnwvKHZemRx7DeUH/Weij0csXDr3SVztdI=";
};
nativeBuildInputs = [ buildPackages.perl ];
perlPreHook = "export LD=$CC";
meta = {
description = "A tool to build C libraries";
Expand Down Expand Up @@ -9595,6 +9599,7 @@ let
url = "mirror://cpan/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz";
hash = "sha256-O7KiC6Nd+VjcCk8jBvwF2QPYuMTePIvu/OF3OdKByVg=";
};
nativeBuildInputs = [ buildPackages.perl ];
propagatedBuildInputs = [ ClassInspector ];
buildInputs = [ FileShareDirInstall ];
meta = {
Expand Down Expand Up @@ -13264,6 +13269,7 @@ let
url = "mirror://cpan/authors/id/A/AL/ALINKE/Lingua-Translit-0.28.tar.gz";
hash = "sha256-ET+R2PwsYwQ3FTpJ+3pSsCOvj2J47ZbAcLH2CCS46uE=";
};
nativeBuildInputs = [ buildPackages.perl ];
doCheck = false;
meta = {
description = "Transliterates text between writing systems";
Expand Down Expand Up @@ -13433,6 +13439,7 @@ let
url = "mirror://cpan/authors/id/R/RE/REHSACK/List-MoreUtils-0.430.tar.gz";
hash = "sha256-Y7H3hCzULZtTjR404DMN5f8VWeTCc3NCUGQYJ29kZSc=";
};
nativeBuildInputs = [ buildPackages.perl ];
propagatedBuildInputs = [ ExporterTiny ListMoreUtilsXS ];
buildInputs = [ TestLeakTrace ];
meta = {
Expand All @@ -13449,8 +13456,9 @@ let
hash = "sha256-6M5G1XwXnuzYdYKT6UAP8wCq8g/v4KnRW5/iMCucskI=";
};
preConfigure = ''
export LD=$CC
makeMakerFlags="CC=$CC LD=$CC";
'';
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Provide the stuff missing in List::Util in XS";
homepage = "https://metacpan.org/release/List-MoreUtils-XS";
Expand All @@ -13465,6 +13473,7 @@ let
url = "mirror://cpan/authors/id/D/DR/DROLSKY/List-SomeUtils-0.58.tar.gz";
hash = "sha256-lur7NZM50ivyot5CEpiEejxA9qKLbUQAXQll2oalRp0=";
};
nativeBuildInputs = [ buildPackages.perl ];
buildInputs = [ TestLeakTrace ];
propagatedBuildInputs = [ ModuleImplementation ];
meta = {
Expand All @@ -13481,6 +13490,7 @@ let
url = "mirror://cpan/authors/id/P/PE/PEVANS/List-UtilsBy-0.11.tar.gz";
hash = "sha256-+t30O0vCHbjkwOiaJuXyP+YmzeNJHsZRtqozhif1d1o=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Higher-order list utility functions";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -15017,6 +15027,7 @@ let
url = "mirror://cpan/authors/id/N/NE/NEZUMI/MIME-Charset-1.012.2.tar.gz";
hash = "sha256-h4x3nAJWxZFma9BsDN5MDXgg7uuY/RGDCCrumh57HRM=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Charset Information for MIME";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -15259,6 +15270,7 @@ let
url = "mirror://cpan/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz";
hash = "sha256-fg9MaSwXQMGshOoU1+o9i8eYsvsmwJh3Ip4E9DCytxc=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Build and install Perl modules";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -15334,6 +15346,7 @@ let
url = "mirror://cpan/authors/id/L/LE/LEONT/Module-Build-Tiny-0.039.tar.gz";
hash = "sha256-fVgP9qzgy+VVvza4bcjqIyWBUwy+quoJvMtXtVeX8Rw=";
};
nativeBuildInputs = [ buildPackages.perl ];
buildInputs = [ FileShareDir ];
propagatedBuildInputs = [ ExtUtilsHelpers ExtUtilsInstallPaths ];
meta = {
Expand Down Expand Up @@ -15687,6 +15700,7 @@ let
url = "mirror://cpan/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz";
hash = "sha256-aDAuxkaDNUfUEL4o4JZ223UAb0qlihHzvbRP/pnw8CQ=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Runtime module handling";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -18226,7 +18240,7 @@ let
preConfigure = ''
mkdir openssl
ln -s ${lib.getLib pkgs.openssl}/lib openssl
ln -s ${pkgs.openssl.bin}/bin openssl
ln -s ${buildPackages.openssl.bin}/bin openssl
ln -s ${pkgs.openssl.dev}/include openssl
export OPENSSL_PREFIX=$(realpath openssl)
'';
Expand Down Expand Up @@ -18724,6 +18738,7 @@ let
url = "mirror://cpan/authors/id/E/ET/ETHER/Package-Stash-0.39.tar.gz";
hash = "sha256-kWX1VREuCASTzg6RKd4Ihtowslk/s1Oiq9HHay0mIbU=";
};
nativeBuildInputs = [ buildPackages.perl ];
buildInputs = [ CPANMetaCheck TestFatal TestNeeds TestRequires ];
propagatedBuildInputs = [ DistCheckConflicts ModuleImplementation ];
meta = {
Expand Down Expand Up @@ -18849,7 +18864,10 @@ let
};
buildInputs = [ TestFatal TestRequires ];
propagatedBuildInputs = [ ModuleImplementation ];
perlPreHook = "export LD=$CC";
nativeBuildInputs = [ buildPackages.perl ];
preConfigure = ''
makeMakerFlags="CC=$CC LD=$CC";
'';
meta = {
description = "Validate method/function parameters";
homepage = "https://metacpan.org/release/Params-Validate";
Expand Down Expand Up @@ -19016,6 +19034,7 @@ let
url = "mirror://cpan/authors/id/J/JT/JTBRAUN/Parse-RecDescent-1.967015.tar.gz";
hash = "sha256-GUMzaky1TxeIpzPwgnwMVdtDENXq4V5UJjnJ3YVlbjc=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Generate Recursive-Descent Parsers";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -20721,6 +20740,7 @@ let
url = "mirror://cpan/authors/id/S/SA/SANKO/Readonly-2.05.tar.gz";
hash = "sha256-SyNUJJGvAQ1EpcfIYSRHOKzHSrq65riDjTVN+xlGK14=";
};
nativeBuildInputs = [ buildPackages.perl ];
buildInputs = [ ModuleBuildTiny ];
meta = {
description = "Facility for creating read-only scalars, arrays, hashes";
Expand Down Expand Up @@ -23980,6 +24000,10 @@ let
url = "mirror://cpan/authors/id/L/LE/LEEJO/Test-LeakTrace-0.16.tar.gz";
hash = "sha256-Xwie7ZFfHsjHQ/bSd3w+zQygHfL3ueEAONMWlSWD5AM=";
};
nativeBuildInputs = [ buildPackages.perl ];
preConfigure = ''
makeMakerFlags="CC=$CC LD=$CC";
'';
meta = {
description = "Traces memory leaks";
homepage = "https://metacpan.org/release/Test-LeakTrace";
Expand Down Expand Up @@ -25099,6 +25123,7 @@ let
};
# libbtparse.so: cannot open shared object file (aarch64 only)
patches = [ ../development/perl-modules/TextBibTeX-use-lib-on-aarch64.patch ];
nativeBuildInputs = [ buildPackages.perl ];
perlPreHook = "export LD=$CC";
perlPostHook = lib.optionalString stdenv.isDarwin ''
oldPath="$(pwd)/btparse/src/libbtparse.dylib"
Expand Down Expand Up @@ -25149,6 +25174,7 @@ let
url = "mirror://cpan/authors/id/I/IS/ISHIGAKI/Text-CSV-2.00.tar.gz";
hash = "sha256-jMvZGVgFIi2ZWEQRTQ5ZW7JM4Yj4UoTb8lYIAxHLssI=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Comma-separated values manipulator (using XS or PurePerl)";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -25780,6 +25806,7 @@ let
url = "mirror://cpan/authors/id/M/MA/MARKF/Test-utf8-1.02.tar.gz";
hash = "sha256-34LwnFlAgwslpJ8cgWL6JNNx5gKIDt742aTUv9Zri9c=";
};
nativeBuildInputs = [ buildPackages.perl ];
meta = {
description = "Handy utf8 tests";
homepage = "https://github.com/2shortplanks/Test-utf8/tree";
Expand Down Expand Up @@ -27320,6 +27347,10 @@ let
buildInputs = [ AlienBuild AlienLibxml2 ]
++ lib.optionals stdenv.isDarwin (with pkgs; [ libiconv zlib ]);
propagatedBuildInputs = [ XMLSAX ];
nativeBuildInputs = [ buildPackages.perl ];
preConfigure = ''
makeMakerFlags="CC=$CC LD=$LD";
'';
meta = {
description = "Perl Binding for libxml2";
license = with lib.licenses; [ artistic1 gpl1Plus ];
Expand Down Expand Up @@ -27347,7 +27378,18 @@ let
url = "mirror://cpan/authors/id/S/SH/SHLOMIF/XML-LibXSLT-1.99.tar.gz";
hash = "sha256-En4XqHf7YeR7nouHv42q0xM5pioAEh+XUdUitDiw9/A=";
};
nativeBuildInputs = [ pkgs.pkg-config ];
patches = lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform)
(fetchpatch {
# Remove the 'have_library()' check. It breaks cross compilation.
# The checked for libxslt and libexslt are pulled in via buildInputs and
# therefore do exist, anyway.
url = "https://raw.githubusercontent.com/void-linux/void-packages/5c37bd5f21c4be14761d85c98c996b2d11ae80c4/srcpkgs/perl-XML-LibXSLT/patches/fix-cross-remove-have_library.patch";
hash = "sha256-ejSdl3HVrMgWLmJK9YEioeheTVJ1J4OHMiQP1oZAsqI=";
});
preConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
makeMakerFlags="CC=$CC LD=$LD INC=-I${pkgs.libxml2.dev}/include/libxml2";
'';
nativeBuildInputs = [ buildPackages.perl buildPackages.pkg-config ];
buildInputs = [ pkgs.zlib pkgs.libxml2 pkgs.libxslt ];
propagatedBuildInputs = [ XMLLibXML ];
meta = {
Expand Down Expand Up @@ -27511,6 +27553,7 @@ let
url = "mirror://cpan/authors/id/G/GR/GRANTM/XML-SAX-1.02.tar.gz";
hash = "sha256-RQbDhwQ6pqd7RV8A9XQJ83IKp+VTSVqyU1JjtO0eoSo=";
};
nativeBuildInputs = [ buildPackages.perl ];
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAXBase ];
postInstall = ''
perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
Expand Down