summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-08-23 16:20:57 +0300
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-10-06 15:49:11 +0000
commitaf937aa45902420196075cbdfae2db68305f8ac5 (patch)
treed43fa955aa750230aae7666e2db0df91c31de1a1
parentMerge pull request #259364 from NixOS/backport-253736-to-release-23.05 (diff)
downloadnixpkgs-af937aa45902420196075cbdfae2db68305f8ac5.tar.gz
nixos/binfmt: use PE magic to detect Wine executablesorigin/backport-250974-to-release-23.05
Otherwise we break every Meson build because it creates native executables named foo.exe (cherry picked from commit c6cf85b0d5db3d4b617ba299bb2a1e09c60a1fef)
-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 b003d983d2be..2c6a2d781549 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 {