summary refs log tree commit diff
diff options
context:
space:
mode:
authorBerk D. Demir <bdd@mindcast.org>2023-03-08 21:07:27 -0800
committerBerk D. Demir <bdd@mindcast.org>2023-03-08 21:07:31 -0800
commit147186a95b7298fd797e0dbf383131632eb595d9 (patch)
treef4e81e878a6a0e7c813a77d7adce24760e9958b0
parenta71e45961e88c8a6dde6287fa1e061f30f8c2fb7 (diff)
downloadnixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar.gz
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar.bz2
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar.lz
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar.xz
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.tar.zst
nixpkgs-147186a95b7298fd797e0dbf383131632eb595d9.zip
nixos/binfmt: fix extension for Windows binaries
Extension based matching for Windows targets define it '.exe' but kernel
documentation explicitly states it should be passed "without the .".

From https://docs.kernel.org/admin-guide/binfmt-misc.html
> * magic:
>   [...] If you chose filename extension matching, this is the
>   extension to be recognised (without the ., the \x0a specials are not
>   allowed).
-rw-r--r--nixos/modules/system/boot/binfmt.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index 98db67e7c00..cceb02c1a73 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -134,11 +134,11 @@ let
       mask = ''\xff\xff\xff\xff'';
     };
     x86_64-windows = {
-      magicOrExtension = ".exe";
+      magicOrExtension = "exe";
       recognitionType = "extension";
     };
     i686-windows = {
-      magicOrExtension = ".exe";
+      magicOrExtension = "exe";
       recognitionType = "extension";
     };
   };