Skip to content

Commit eb3e0c5

Browse files
committed
Fix mcfgthread Windows cross-build: add windres wrapper
mcfgthread 2.1.1 in nixpkgs-2511 switched from autotools to meson. meson's import('windows').compile_resources() needs windres to compile version.rc, but the package only creates a dlltool wrapper. The prefixed x86_64-w64-mingw32-windres exists in the cross-bintools but meson searches for the unprefixed name. Add a windres wrapper using the same pattern as the existing dlltool wrapper. Fixes all 34 remaining Windows build failures in eval 424.
1 parent 9355df5 commit eb3e0c5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

flake.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@
116116
(prev.lib.cmakeBool "ENABLE_LIB_ONLY" true)
117117
];
118118
});
119+
120+
# mcfgthread 2.1.1 (nixpkgs-2511) switched from autotools to meson.
121+
# meson's import('windows').compile_resources() requires `windres`
122+
# but the package only creates a dlltool wrapper, not windres.
123+
# The prefixed x86_64-w64-mingw32-windres exists in the cross-bintools
124+
# but meson searches for the unprefixed name. Same pattern as dlltool.
125+
windows = prev.windows // {
126+
mcfgthreads = prev.windows.mcfgthreads.overrideAttrs (old: {
127+
nativeBuildInputs = old.nativeBuildInputs ++ [
128+
(prev.writeScriptBin "windres" ''
129+
${prev.stdenv.cc.targetPrefix}windres "$@"
130+
'')
131+
];
132+
});
133+
};
119134
});
120135

121136
musl = (final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl {

0 commit comments

Comments
 (0)