summary refs log tree commit diff
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-08-23 16:20:57 +0300
committerK900 <me@0upti.me>2023-08-23 16:20:57 +0300
commitc6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef (patch)
treea6da95e183b3238a5f76e06fb9b71960722ab8c2
parentff194085eb9d58a75906e3d5be5e66d9c2570509 (diff)
downloadnixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar.gz
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar.bz2
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar.lz
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar.xz
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.tar.zst
nixpkgs-c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef.zip
nixos/binfmt: use PE magic to detect Wine executables
Otherwise we break every Meson build because it creates native executables named foo.exe
-rw-r--r--nixos/modules/system/boot/binfmt.nix10
1 files changed, 2 insertions, 8 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index bf1688feb19..5172371d0af 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -137,14 +137,8 @@ let
       magicOrExtension = ''\x00asm'';
       mask = ''\xff\xff\xff\xff'';
     };
-    x86_64-windows = {
-      magicOrExtension = "exe";
-      recognitionType = "extension";
-    };
-    i686-windows = {
-      magicOrExtension = "exe";
-      recognitionType = "extension";
-    };
+    x86_64-windows.magicOrExtension = "MZ";
+    i686-windows.magicOrExtension = "MZ";
   };
 
 in {