summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific/windows
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-05-24 21:23:23 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-05-24 21:23:23 +0000
commit3729f9ce5ea25fbbe33f63277ebafca1c62f4683 (patch)
tree43a0bbaa3b6d7f43088f95683d8666c437c47edc /pkgs/os-specific/windows
parent37fce10f9b26b826d5030906406639bcd9e77e45 (diff)
Trying to add a few bits of mingw-w64. To be tested.
svn path=/nixpkgs/trunk/; revision=34228
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r--pkgs/os-specific/windows/mingw-w64/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix
new file mode 100644
index 000000000000..570b40bdac69
--- /dev/null
+++ b/pkgs/os-specific/windows/mingw-w64/default.nix
@@ -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;
+})
+)