2016-04-27 03:46:36 +03:00
|
|
|
{ stdenv, fetchurl, perl, zlib }:
|
2007-11-11 19:19:00 +03:00
|
|
|
|
2012-02-09 18:09:08 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2016-04-27 03:46:36 +03:00
|
|
|
name = "libzip-${version}";
|
2017-11-08 19:32:26 +03:00
|
|
|
version = "1.3.0";
|
2015-04-06 13:11:51 +03:00
|
|
|
|
2009-04-22 03:18:09 +04:00
|
|
|
src = fetchurl {
|
2018-01-05 22:42:46 +03:00
|
|
|
url = "https://www.nih.at/libzip/${name}.tar.gz";
|
2017-11-08 19:32:26 +03:00
|
|
|
sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
|
2009-04-22 03:18:09 +04:00
|
|
|
};
|
2015-04-06 13:11:51 +03:00
|
|
|
|
2016-08-29 03:30:01 +03:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-04-25 14:51:29 +03:00
|
|
|
|
2016-04-27 03:46:36 +03:00
|
|
|
nativeBuildInputs = [ perl ];
|
2012-02-09 18:22:13 +04:00
|
|
|
propagatedBuildInputs = [ zlib ];
|
2007-11-11 19:19:00 +03:00
|
|
|
|
2016-04-27 03:46:36 +03:00
|
|
|
preInstall = ''
|
|
|
|
patchShebangs man/handle_links
|
|
|
|
'';
|
|
|
|
|
2012-02-28 20:26:55 +04:00
|
|
|
# At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
|
|
|
|
# had this same problem. This links it somewhere that mysqlworkbench looks.
|
|
|
|
postInstall = ''
|
2016-04-27 03:48:59 +03:00
|
|
|
mkdir -p $dev/lib
|
|
|
|
mv $out/lib/libzip $dev/lib/libzip
|
2016-04-25 14:51:29 +03:00
|
|
|
( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
|
2012-02-28 20:26:55 +04:00
|
|
|
'';
|
|
|
|
|
2009-04-22 03:18:09 +04:00
|
|
|
meta = {
|
2018-01-05 22:42:46 +03:00
|
|
|
homepage = https://www.nih.at/libzip;
|
2009-04-22 03:18:09 +04:00
|
|
|
description = "A C library for reading, creating and modifying zip archives";
|
2016-04-27 04:10:54 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-04-22 03:18:09 +04:00
|
|
|
};
|
2007-11-11 19:19:00 +03:00
|
|
|
}
|