core/pkgs/by-name/wi/windows/mingw-w64/default.nix

27 lines
727 B
Nix
Raw Normal View History

2024-05-13 21:24:10 +00:00
{ lib, stdenv, windows, fetchurl, autoreconfHook }:
2024-05-02 00:46:19 +00:00
2024-05-13 21:24:10 +00:00
let version = "11.0.1";
2024-05-02 00:46:19 +00:00
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" ];
2024-05-13 21:24:10 +00:00
configureFlags = [ "--enable-idl" "--enable-secure-api" ]
++ lib.optionals (stdenv.targetPlatform.libc == "ucrt")
[ "--with-default-msvcrt=ucrt" ];
2024-05-02 00:46:19 +00:00
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ windows.mingw_w64_headers ];
hardeningDisable = [ "stackprotector" "fortify" ];
2024-05-13 21:24:10 +00:00
meta = { platforms = lib.platforms.windows; };
2024-05-02 00:46:19 +00:00
}