2022-12-01 08:31:11 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, windows
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
2018-08-10 16:00:49 +00:00
|
|
|
|
|
|
|
let
|
2022-05-16 10:36:21 +00:00
|
|
|
version = "10.0.0";
|
2018-08-10 16:00:49 +00:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "mingw-w64";
|
|
|
|
inherit version;
|
2018-08-10 16:00:49 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2";
|
2022-05-16 10:36:21 +00:00
|
|
|
hash = "sha256-umtDCu1yxjo3aFMfaj/8Kw/eLFejslFFDc9ImolPCJQ=";
|
2018-08-10 16:00:49 +00:00
|
|
|
};
|
|
|
|
|
2022-12-01 08:31:11 +00:00
|
|
|
patches = [
|
|
|
|
# Upstream patches to fix build parallelism
|
|
|
|
(fetchpatch {
|
|
|
|
name = "crt-suff-make-4.4.patch";
|
|
|
|
url = "https://github.com/mirror/mingw-w64/commit/953bcd32ae470c4647e94de8548dda5a8f07d82d.patch";
|
|
|
|
hash = "sha256-lrS4ZDa/Uwsj5DXajOUv+knZXan0JVU70KHHdIjJ07Y=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "dll-dep-make-4.4.patch";
|
|
|
|
url = "https://github.com/mirror/mingw-w64/commit/e1b0c1420bbd52ef505c71737c57393ac1397b0a.patch";
|
|
|
|
hash = "sha256-/56Cmmy0UYTaDKIWG7CgXsThvCHK6lSbekbBOoOJSIQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-11-11 05:08:45 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2018-08-10 16:00:49 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-idl"
|
|
|
|
"--enable-secure-api"
|
2022-05-18 11:50:23 +00:00
|
|
|
];
|
2012-05-24 21:23:23 +00:00
|
|
|
|
2019-11-11 05:08:45 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-12-01 08:31:11 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2017-06-19 19:30:17 +00:00
|
|
|
buildInputs = [ windows.mingw_w64_headers ];
|
2017-12-29 14:29:05 +00:00
|
|
|
hardeningDisable = [ "stackprotector" "fortify" ];
|
2018-08-10 15:51:18 +00:00
|
|
|
|
|
|
|
meta = {
|
2021-01-15 14:45:37 +00:00
|
|
|
platforms = lib.platforms.windows;
|
2018-08-10 15:51:18 +00:00
|
|
|
};
|
2017-06-19 15:51:01 +00:00
|
|
|
}
|