mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 15:23:26 +03:00
ccc497f80d
svn path=/nixpkgs/trunk/; revision=22529
25 lines
610 B
Nix
25 lines
610 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;
|
|
}
|