From 3f7bc8ffb82ed47392099f839bda2561fe827930 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Sun, 21 Jun 2026 20:26:50 +0200 Subject: [PATCH] HACK: patch out broken Perl version compatability check on macOS Change-Id: I85cfc3863299d06f36138753e8f1f0206a6a6964 --- perl/lib/Nix/Store.xs | 13 +++++++++++++ perl/lib/Nix/meson.build | 1 + 2 files changed, 14 insertions(+) diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index fb32c3124..4831b5b98 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -9,6 +9,19 @@ #include "perl.h" #include "XSUB.h" +// HACK, XXX(Qyriad): I do not know why the Perl version compatability check on macOS +// is raising, but as far as I can tell it is wrong. +// So instead we will replace the "check calling convention and get args" macro with +// the "unchecked get args" macro. +// If someone knows why when this file is compiled with Nixpkgs Perl 5.42.0, +// and then loaded with Nixpkgs Perl 5.42.0, it raises: +// lib/Nix/Store.cc: loadable library and perl binaries are mismatched (got first handshake key 0x10200080, needed 0xff80080 +// please let me know. +#if defined(__APPLE__) && __APPLE__ +#undef dXSBOOTARGSAPIVERCHK +#define dXSBOOTARGSAPIVERCHK dXSARGS +#endif + #undef NDEBUG /* Prevent a clash between some Perl and libstdc++ macros. */ diff --git a/perl/lib/Nix/meson.build b/perl/lib/Nix/meson.build index 0460d1d02..cd62a5e16 100644 --- a/perl/lib/Nix/meson.build +++ b/perl/lib/Nix/meson.build @@ -3,6 +3,7 @@ store_xs_cpp = custom_target( output : 'Store.cc', command : [ xsubpp, + '-noversioncheck', '@INPUT@', '-output', '@OUTPUT@',