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

36 lines
954 B
Nix
Raw Normal View History

{ stdenv, fetchurl, cmake, perl, zlib }:
stdenv.mkDerivation rec {
pname = "libzip";
2020-03-06 22:39:46 +01:00
version = "1.6.1";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
2020-03-06 22:39:46 +01:00
sha256 = "120xgf7cgjmz9d3yp10lks6lhkgxqb4skbmbiiwf46gx868qxsq6";
};
# Fix pkgconfig file paths
2018-08-08 20:55:33 +02:00
postPatch = ''
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 20:55:33 +02:00
'';
outputs = [ "out" "dev" ];
2016-04-25 13:51:29 +02:00
nativeBuildInputs = [ cmake perl ];
propagatedBuildInputs = [ zlib ];
2018-08-08 20:55:33 +02:00
preCheck = ''
# regress/runtest is a generated file
2018-08-08 20:55:33 +02:00
patchShebangs regress
2016-04-27 02:46:36 +02:00
'';
2018-08-09 11:13:29 +02:00
meta = with stdenv.lib; {
2020-03-06 22:39:46 +01:00
homepage = "https://www.nih.at/libzip";
description = "A C library for reading, creating and modifying zip archives";
2018-08-09 11:13:29 +02:00
license = licenses.bsd3;
platforms = platforms.unix;
};
}