Unverified Commit a32e4ad1 authored by andre4ik3's avatar andre4ik3
Browse files

nixos/rosetta: use binary magics from utils

parent 4cf86f28
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;