mirth: patch up st_mode offset on aarch64-linux
This is out of my wheelhouse but mirrors the Darwin code. It’s either do this sort of ugly patch, or set a aarch64-linux to broken… Assisted-by: DeepSeek V4 Flash
This commit is contained in:
@@ -34,6 +34,14 @@ stdenv.mkDerivation {
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
||||
postPatch = ''
|
||||
${lib.optionalString (with stdenv.buildPlatform; isAarch64 && isLinux) /* sh */ ''
|
||||
# Bug report: https://todo.sr.ht/~typeswitch/mirth/16
|
||||
substituteInPlace bin/mirth0.c \
|
||||
--replace-fail "WRAP_I63(24LL);" "WRAP_I63(16LL);"
|
||||
substituteInPlace lib/std/world.mth \
|
||||
--replace-fail "Linux -> 24u," "Linux -> running-arch Arch.ARM64 = if(16u, 24u),"
|
||||
''}
|
||||
|
||||
# Replace hard-coded GCC with stdenv’s C compiler.
|
||||
# NOTE: newer GCC requires optimization level ≥1 to use fortity. -O1 is
|
||||
# fast enough as a default for the compiler stages.
|
||||
@@ -51,7 +59,8 @@ stdenv.mkDerivation {
|
||||
"bin/mirth3"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
# st_mode substitution intentionally diverges from the pre-generated mirth0.c
|
||||
doCheck = with stdenv.buildPlatform; !(isAarch64 && isLinux);
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
Reference in New Issue
Block a user