nixos/rosetta: use binary magics from utils

This commit is contained in:
andre4ik3
2025-09-10 11:57:02 +00:00
parent 4cf86f2891
commit a32e4ad16b
+2 -2
View File
@@ -2,6 +2,7 @@
config,
lib,
pkgs,
utils,
...
}:
@@ -72,8 +73,7 @@ in
# The required flags for binfmt are documented by Apple:
# https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
inherit (utils.binfmtMagics.x86_64-linux) magicOrExtension mask;
fixBinary = true;
matchCredentials = true;
preserveArgvZero = false;