about summary refs log tree commit diff
path: root/pkgs/os-specific/windows/mingw-w64/default.nix
blob: ba2b243a9408a5cec458ca9ad0e67935d1a2f98f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ lib
, stdenv
, windows
, fetchurl
, autoreconfHook
, mingw_w64_headers
}:

stdenv.mkDerivation {
  pname = "mingw-w64";
  inherit (mingw_w64_headers) version src meta;

  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" ];
}