mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
12e960f592
I made it statically build by default I had to fix the zlib static cross-build, because the native stripping corrupted the target static library. It is not the first time I see this. I add drobear to the cross-built packages for hydra. svn path=/nixpkgs/trunk/; revision=20518
25 lines
605 B
Nix
25 lines
605 B
Nix
{stdenv, fetchurl, static ? false}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "zlib-1.2.3";
|
|
src = fetchurl {
|
|
url = http://www.zlib.net/zlib-1.2.3.tar.gz;
|
|
md5 = "debc62758716a169df9f62e6ab2bc634";
|
|
};
|
|
configureFlags = if static then "" else "--shared";
|
|
|
|
preConfigure = ''
|
|
if test -n "$crossConfig"; then
|
|
export CC=$crossConfig-gcc
|
|
configureFlags=${if static then "" else "--shared"}
|
|
fi
|
|
'';
|
|
|
|
crossAttrs = {
|
|
dontStrip = if static then true else false;
|
|
};
|
|
|
|
# zlib doesn't like the automatic --disable-shared from the Cygwin stdenv.
|
|
cygwinConfigureEnableShared = true;
|
|
}
|