diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 14:23:05 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 14:23:05 -0500 |
commit | 2365e2ffcd1ecd95bda8a81fe7de32edc1073b35 (patch) | |
tree | 6671ba9c8e2a043f79745436beb05f74eec0f564 /pkgs/os-specific/windows | |
parent | 771bae04e8ebcef3f11a0be55c28a571181aa231 (diff) | |
parent | 51948eab9415fde1825dea5c7d31b99b2e1a0fdb (diff) |
Merge commit '51948eab9415fde1825dea5c7d31b99b2e1a0fdb' into mingw32-w64-fix
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r-- | pkgs/os-specific/windows/mingw-w64/common.nix | 11 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingw-w64/default.nix | 39 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingw-w64/headers.nix | 13 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingw-w64/pthreads.nix | 13 |
4 files changed, 42 insertions, 34 deletions
diff --git a/pkgs/os-specific/windows/mingw-w64/common.nix b/pkgs/os-specific/windows/mingw-w64/common.nix new file mode 100644 index 000000000000..ece2586dc806 --- /dev/null +++ b/pkgs/os-specific/windows/mingw-w64/common.nix @@ -0,0 +1,11 @@ +{ fetchurl }: + +rec { + version = "4.0.6"; + name = "mingw-w64-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2"; + sha256 = "0p01vm5kx1ixc08402z94g1alip4vx66gjpvyi9maqyqn2a76h0c"; + }; +} diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix index 49612b0b4618..6e21826381b6 100644 --- a/pkgs/os-specific/windows/mingw-w64/default.nix +++ b/pkgs/os-specific/windows/mingw-w64/default.nix @@ -1,36 +1,7 @@ -{ stdenv, fetchurl, binutils ? null, gccCross ? null -, onlyHeaders ? false -, onlyPthreads ? false -}: - -let - version = "4.0.6"; - name = "mingw-w64-${version}"; -in -stdenv.mkDerivation ({ - inherit name; - - src = fetchurl { - url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2"; - sha256 = "0p01vm5kx1ixc08402z94g1alip4vx66gjpvyi9maqyqn2a76h0c"; - }; -} // -(if onlyHeaders then { - name = name + "-headers"; - preConfigure = '' - cd mingw-w64-headers - ''; - configureFlags = "--without-crt"; -} else if onlyPthreads then { - name = name + "-pthreads"; - preConfigure = '' - cd mingw-w64-libraries/winpthreads - ''; -} else { - buildInputs = [ gccCross binutils ]; - - crossConfig = gccCross.crossConfig; +{ stdenv, callPackage, windows }: +stdenv.mkDerivation { + inherit (callPackage ./common.nix {}) name src; + buildInputs = [ windows.mingw_w64_headers ]; dontStrip = true; -}) -) +} diff --git a/pkgs/os-specific/windows/mingw-w64/headers.nix b/pkgs/os-specific/windows/mingw-w64/headers.nix new file mode 100644 index 000000000000..03dbf712e2e5 --- /dev/null +++ b/pkgs/os-specific/windows/mingw-w64/headers.nix @@ -0,0 +1,13 @@ +{ stdenvNoCC, callPackage }: + +let + inherit (callPackage ./common.nix {}) name src; + +in stdenvNoCC.mkDerivation { + name = name + "-headers"; + inherit src; + + preConfigure = '' + cd mingw-w64-headers + ''; +} diff --git a/pkgs/os-specific/windows/mingw-w64/pthreads.nix b/pkgs/os-specific/windows/mingw-w64/pthreads.nix new file mode 100644 index 000000000000..c585ab54ff89 --- /dev/null +++ b/pkgs/os-specific/windows/mingw-w64/pthreads.nix @@ -0,0 +1,13 @@ +{ stdenvNoCC, callPackage }: + +let + inherit (callPackage ./common.nix {}) name src; + +in stdenvNoCC.mkDerivation { + name = name + "-pthreads"; + inherit src; + + preConfigure = '' + cd mingw-w64-libraries/winpthreads + ''; +} |