2012-01-30 09:53:39 +00:00
|
|
|
{ stdenv, fetchurl, xz, binutilsCross ? null
|
|
|
|
, gccCross ? null, onlyHeaders ? false }:
|
2010-05-06 18:22:51 +00:00
|
|
|
|
|
|
|
let
|
2012-01-30 09:53:39 +00:00
|
|
|
name = "w32api-3.17-2";
|
2010-05-06 18:22:51 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation ({
|
|
|
|
inherit name;
|
2012-01-30 09:53:39 +00:00
|
|
|
|
2010-05-06 18:22:51 +00:00
|
|
|
src = fetchurl {
|
2012-01-30 09:53:39 +00:00
|
|
|
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma";
|
|
|
|
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
2010-05-06 18:22:51 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ xz ];
|
2012-01-30 09:53:39 +00:00
|
|
|
|
2010-05-06 18:22:51 +00:00
|
|
|
} //
|
|
|
|
(if onlyHeaders then {
|
|
|
|
name = name + "-headers";
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2010-05-06 18:22:51 +00:00
|
|
|
cp -R include $out
|
|
|
|
'';
|
|
|
|
} else {
|
|
|
|
buildInputs = [ gccCross binutilsCross ];
|
|
|
|
|
|
|
|
crossConfig = gccCross.crossConfig;
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
})
|
|
|
|
)
|