Merge 'mingw-w64' and 'darwin' into cross-win-osx.
Both branches have quite a lot in common, so it's time for a merge and do the cleanups with respect to both implementations and also generalize both implementations as much as possible. This also closes #1876. Conflicts: pkgs/development/interpreters/lua-5/5.2.nix pkgs/development/libraries/SDL/default.nix pkgs/development/libraries/glew/default.nix pkgs/top-level/all-packages.nix
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}:
|
||||
{ stdenv, fetchurl, binutilsCross ? null, gccCross ? null
|
||||
, onlyHeaders ? false
|
||||
, onlyPthreads ? false
|
||||
}:
|
||||
|
||||
let
|
||||
name = "mingw-w64-2.0.3";
|
||||
name = "mingw-w64-3.1.0";
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
inherit name;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v2.0.3.tar.gz";
|
||||
sha256 = "043jk6z90f9pxs9kfn6ckh2vlnbgcv6yfbp5ybahrj3z58dcijp5";
|
||||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v3.1.0.tar.bz2";
|
||||
sha256 = "1lhpw381gc59w8b1r9zzdwa9cdi2wx6qx7s6rvajapmbw7ksgrzc";
|
||||
};
|
||||
|
||||
# I don't know what's that $host directory about, I put the
|
||||
# files inside include as usual.
|
||||
postInstall = ''
|
||||
rmdir $out/include
|
||||
mv $out/x86_64-w64-mingw32/* $out
|
||||
rm -R $out/x86_64-w64-mingw32
|
||||
'';
|
||||
} //
|
||||
(if onlyHeaders then {
|
||||
name = name + "-headers";
|
||||
preConfingure = ''
|
||||
preConfigure = ''
|
||||
cd mingw-w64-headers
|
||||
'';
|
||||
configureFlags = "--without-crt --host=x86_64-w64-mingw32";
|
||||
configureFlags = "--without-crt";
|
||||
} else if onlyPthreads then {
|
||||
name = name + "-pthreads";
|
||||
preConfigure = ''
|
||||
cd mingw-w64-libraries/winpthreads
|
||||
'';
|
||||
} else {
|
||||
buildInputs = [ gccCross binutilsCross ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user