mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
Trying to add a few bits of mingw-w64. To be tested.
svn path=/nixpkgs/trunk/; revision=34228
This commit is contained in:
parent
37fce10f9b
commit
3729f9ce5e
35
pkgs/os-specific/windows/mingw-w64/default.nix
Normal file
35
pkgs/os-specific/windows/mingw-w64/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}:
|
||||
|
||||
let
|
||||
name = "mingw-w64-2.0.3";
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
inherit name;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v2.0.3.tar.gz";
|
||||
sha256 = "043jk6z90f9pxs9kfn6ckh2vlnbgcv6yfbp5ybahrj3z58dcijp5";
|
||||
};
|
||||
|
||||
} //
|
||||
(if onlyHeaders then {
|
||||
name = name + "-headers";
|
||||
preConfingure = ''
|
||||
cd mingw-w64-headers
|
||||
'';
|
||||
configureFlags = "--without-crt --host=x86_64-w64-mingw32";
|
||||
|
||||
# I don't know what's that $host directory about, I put the
|
||||
# files inside include as usual.
|
||||
postInstall = ''
|
||||
mv $out/x86_64-w64-mingw32/include/* $out/include
|
||||
rm -R $out/x86_64-w64-mingw32
|
||||
'';
|
||||
} else {
|
||||
buildInputs = [ gccCross binutilsCross ];
|
||||
|
||||
crossConfig = gccCross.crossConfig;
|
||||
|
||||
dontStrip = true;
|
||||
})
|
||||
)
|
@ -1852,7 +1852,9 @@ let
|
||||
|
||||
gccCrossStageStatic = let
|
||||
isMingw = (stdenv.cross.libc == "msvcrt");
|
||||
libcCross1 = if isMingw then windows.mingw_headers1 else null;
|
||||
isMingw64 = (stdenv.cross.libc == "msvcrt64");
|
||||
libcCross1 = if isMingw then windows.mingw_headers1 else
|
||||
if isMingw64 then windows.mingw_w64_headers else null;
|
||||
in
|
||||
wrapGCCCross {
|
||||
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
|
||||
@ -6076,6 +6078,15 @@ let
|
||||
paths = [ w32api mingw_runtime ];
|
||||
};
|
||||
|
||||
mingw_w64 = callPackage ../os-specific/windows/mingw-w64 {
|
||||
gccCross = gccCrossStageStatic;
|
||||
binutilsCross = binutilsCross;
|
||||
};
|
||||
|
||||
mingw_w64_headers = callPackage ../os-specific/windows/mingw-w64 {
|
||||
onlyHeaders = true;
|
||||
};
|
||||
|
||||
pthreads = callPackage ../os-specific/windows/pthread-w32 {
|
||||
mingw_headers = mingw_headers2;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user