summary refs log tree commit diff
path: root/pkgs/os-specific/windows
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-05-06 18:22:51 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-05-06 18:22:51 +0000
commitc548c084bbc009912673f8020298d698d2792e9d (patch)
tree006dba6cfbc421503805621746fa157a1bc88d6e /pkgs/os-specific/windows
parent3b2d0133f37af09cdbbd3a60a633fc0dab969fce (diff)
downloadnixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar.gz
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar.bz2
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar.lz
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar.xz
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.tar.zst
nixpkgs-c548c084bbc009912673f8020298d698d2792e9d.zip
Making gcc-4.5 cross-build to mingw32 too (set by the proper config and libc = "msvcrt"
in the crossSystem)

svn path=/nixpkgs/trunk/; revision=21630
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r--pkgs/os-specific/windows/mingw-headers/default.nix13
-rw-r--r--pkgs/os-specific/windows/mingwrt/default.nix29
-rw-r--r--pkgs/os-specific/windows/w32api/default.nix29
3 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/os-specific/windows/mingw-headers/default.nix b/pkgs/os-specific/windows/mingw-headers/default.nix
new file mode 100644
index 00000000000..c4e0063feec
--- /dev/null
+++ b/pkgs/os-specific/windows/mingw-headers/default.nix
@@ -0,0 +1,13 @@
+{stdenv, mingw_runtime_headers, w32api_headers}:
+
+stdenv.mkDerivation {
+  name = "mingw-headers";
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    ensureDir $out/include
+    cp -R ${mingw_runtime_headers}/include/* $out/include
+    cp -R ${w32api_headers}/include/* $out/include
+  '';
+}
diff --git a/pkgs/os-specific/windows/mingwrt/default.nix b/pkgs/os-specific/windows/mingwrt/default.nix
new file mode 100644
index 00000000000..aecf43c9123
--- /dev/null
+++ b/pkgs/os-specific/windows/mingwrt/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}:
+
+let
+  name = "mingwrt-3.18";
+in
+stdenv.mkDerivation (rec {
+  inherit name;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mingw/${name}-mingw32-src.tar.gz";
+    sha256 = "0hmxgkxnf6an70g07gmyik46sw1qm204izh6sp923szddvypjjfy";
+  };
+
+} //
+(if onlyHeaders then {
+  name = name + "-headers";
+  phases = [ "unpackPhase" "installPhase" ];
+  installPhase = ''
+    ensureDir $out
+    cp -R include $out
+  '';
+} else {
+  buildInputs = [ gccCross binutilsCross ];
+
+  crossConfig = gccCross.crossConfig;
+
+  dontStrip = true;
+})
+)
diff --git a/pkgs/os-specific/windows/w32api/default.nix b/pkgs/os-specific/windows/w32api/default.nix
new file mode 100644
index 00000000000..570b83f671e
--- /dev/null
+++ b/pkgs/os-specific/windows/w32api/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}:
+
+let
+  name = "w32api-3.14";
+in
+stdenv.mkDerivation ({
+  inherit name;
+ 
+  src = fetchurl {
+    url = "mirror://sourceforge/mingw/${name}-mingw32-src.tar.gz";
+    sha256 = "128ax8a4dlspxsi5fi7bi1aslppqx3kczr1ibzj1z1az48bvwp21";
+  };
+
+} //
+(if onlyHeaders then {
+  name = name + "-headers";
+  phases = [ "unpackPhase" "installPhase" ];
+  installPhase = ''
+    ensureDir $out
+    cp -R include $out
+  '';
+} else {
+  buildInputs = [ gccCross binutilsCross ];
+
+  crossConfig = gccCross.crossConfig;
+
+  dontStrip = true;
+})
+)