mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 15:23:26 +03:00
30 lines
601 B
Nix
30 lines
601 B
Nix
|
{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;
|
||
|
})
|
||
|
)
|