core/pkgs/by-name/wi/windows/mingw-w64/default.nix
2024-05-13 11:34:52 -04:00

38 lines
747 B
Nix

{ lib
, stdenv
, windows
, fetchurl
, autoreconfHook
}:
let
version = "11.0.1";
in stdenv.mkDerivation {
pname = "mingw-w64";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2";
hash = "sha256-P2a84Gnui+10OaGhPafLkaXmfqYXDyExesf1eUYl7hA=";
};
outputs = [ "out" "dev" ];
configureFlags = [
"--enable-idl"
"--enable-secure-api"
] ++ lib.optionals (stdenv.targetPlatform.libc == "ucrt") [
"--with-default-msvcrt=ucrt"
];
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ windows.mingw_w64_headers ];
hardeningDisable = [ "stackprotector" "fortify" ];
meta = {
platforms = lib.platforms.windows;
};
}