depot/pkgs/os-specific/windows/mingw-w64/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

43 lines
895 B
Nix

{
lib,
stdenv,
windows,
autoreconfHook,
mingw_w64_headers,
crt ? stdenv.hostPlatform.libc,
}:
assert lib.assertOneOf "crt" crt [
"msvcrt"
"ucrt"
];
stdenv.mkDerivation {
pname = "mingw-w64";
inherit (mingw_w64_headers) version src meta;
outputs = [
"out"
"dev"
];
configureFlags = [
(lib.enableFeature true "idl")
(lib.enableFeature true "secure-api")
(lib.withFeatureAs true "default-msvcrt" crt)
# Including other architectures causes errors with invalid asm
(lib.enableFeature stdenv.hostPlatform.isi686 "lib32")
(lib.enableFeature stdenv.hostPlatform.isx86_64 "lib64")
(lib.enableFeature stdenv.hostPlatform.isAarch64 "libarm64")
];
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ windows.mingw_w64_headers ];
hardeningDisable = [
"stackprotector"
"fortify"
];
}