2019-11-13 20:58:39 +00:00
|
|
|
{ stdenv, fetchurl, cmake, perl, zlib }:
|
2007-11-11 16:19:00 +00:00
|
|
|
|
2012-02-09 14:09:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libzip";
|
2020-03-06 21:39:46 +00:00
|
|
|
version = "1.6.1";
|
2015-04-06 10:11:51 +00:00
|
|
|
|
2009-04-21 23:18:09 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
|
2020-03-06 21:39:46 +00:00
|
|
|
sha256 = "120xgf7cgjmz9d3yp10lks6lhkgxqb4skbmbiiwf46gx868qxsq6";
|
2009-04-21 23:18:09 +00:00
|
|
|
};
|
2015-04-06 10:11:51 +00:00
|
|
|
|
2019-11-13 20:58:39 +00:00
|
|
|
# Fix pkgconfig file paths
|
2018-08-08 18:55:33 +00:00
|
|
|
postPatch = ''
|
2019-11-13 20:58:39 +00:00
|
|
|
sed -i CMakeLists.txt \
|
|
|
|
-e 's#\\''${exec_prefix}/''${CMAKE_INSTALL_LIBDIR}#''${CMAKE_INSTALL_FULL_LIBDIR}#' \
|
|
|
|
-e 's#\\''${prefix}/''${CMAKE_INSTALL_INCLUDEDIR}#''${CMAKE_INSTALL_FULL_INCLUDEDIR}#'
|
2018-08-08 18:55:33 +00:00
|
|
|
'';
|
|
|
|
|
2016-08-29 00:30:01 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-04-25 11:51:29 +00:00
|
|
|
|
2019-11-13 20:58:39 +00:00
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2012-02-09 14:22:13 +00:00
|
|
|
propagatedBuildInputs = [ zlib ];
|
2007-11-11 16:19:00 +00:00
|
|
|
|
2018-08-08 18:55:33 +00:00
|
|
|
preCheck = ''
|
2019-11-13 20:58:39 +00:00
|
|
|
# regress/runtest is a generated file
|
2018-08-08 18:55:33 +00:00
|
|
|
patchShebangs regress
|
2016-04-27 00:46:36 +00:00
|
|
|
'';
|
|
|
|
|
2018-08-09 09:13:29 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-06 21:39:46 +00:00
|
|
|
homepage = "https://www.nih.at/libzip";
|
2009-04-21 23:18:09 +00:00
|
|
|
description = "A C library for reading, creating and modifying zip archives";
|
2018-08-09 09:13:29 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
2009-04-21 23:18:09 +00:00
|
|
|
};
|
2007-11-11 16:19:00 +00:00
|
|
|
}
|