nixpkgs/pkgs/development/libraries/libzip/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2016-04-27 01:46:36 +01:00
{ stdenv, fetchurl, perl, zlib }:
stdenv.mkDerivation rec {
pname = "libzip";
2017-11-08 16:32:26 +00:00
version = "1.3.0";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
2017-11-08 16:32:26 +00:00
sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
};
2018-08-08 19:55:33 +01:00
postPatch = ''
patchShebangs test-driver
patchShebangs man/handle_links
'';
outputs = [ "out" "dev" ];
2016-04-25 12:51:29 +01:00
2016-04-27 01:46:36 +01:00
nativeBuildInputs = [ perl ];
propagatedBuildInputs = [ zlib ];
2018-08-08 19:55:33 +01:00
preCheck = ''
# regress/runtests is a generated file
patchShebangs regress
2016-04-27 01:46:36 +01:00
'';
# At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
# had this same problem. This links it somewhere that mysqlworkbench looks.
postInstall = ''
mkdir -p $dev/lib
mv $out/lib/libzip $dev/lib/libzip
2016-04-25 12:51:29 +01:00
( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
'';
2018-08-09 10:13:29 +01:00
meta = with stdenv.lib; {
homepage = https://www.nih.at/libzip;
description = "A C library for reading, creating and modifying zip archives";
2018-08-09 10:13:29 +01:00
license = licenses.bsd3;
platforms = platforms.unix;
};
}