2014-02-24 03:44:43 +00:00
|
|
|
{ stdenv, fetchurl, binutilsCross ? null, gccCross ? null
|
|
|
|
, onlyHeaders ? false
|
|
|
|
, onlyPthreads ? false
|
|
|
|
}:
|
2012-05-24 21:23:23 +00:00
|
|
|
|
|
|
|
let
|
2014-02-23 22:44:11 +00:00
|
|
|
name = "mingw-w64-3.1.0";
|
2012-05-24 21:23:23 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation (rec {
|
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2014-02-23 22:44:11 +00:00
|
|
|
url = "mirror://sourceforge/mingw-w64/mingw-w64-v3.1.0.tar.bz2";
|
|
|
|
sha256 = "1lhpw381gc59w8b1r9zzdwa9cdi2wx6qx7s6rvajapmbw7ksgrzc";
|
2012-05-24 21:23:23 +00:00
|
|
|
};
|
|
|
|
} //
|
|
|
|
(if onlyHeaders then {
|
|
|
|
name = name + "-headers";
|
2014-02-24 03:43:00 +00:00
|
|
|
preConfigure = ''
|
2012-05-24 21:23:23 +00:00
|
|
|
cd mingw-w64-headers
|
|
|
|
'';
|
2014-03-03 21:31:18 +00:00
|
|
|
configureFlags = "--without-crt";
|
2014-02-24 03:44:43 +00:00
|
|
|
} else if onlyPthreads then {
|
|
|
|
name = name + "-pthreads";
|
|
|
|
preConfigure = ''
|
|
|
|
cd mingw-w64-libraries/winpthreads
|
|
|
|
'';
|
2012-05-24 21:23:23 +00:00
|
|
|
} else {
|
|
|
|
buildInputs = [ gccCross binutilsCross ];
|
|
|
|
|
|
|
|
crossConfig = gccCross.crossConfig;
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
})
|
|
|
|
)
|