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