depot/third_party/nixpkgs/pkgs/development/libraries/libzip/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

35 lines
954 B
Nix

{ stdenv, fetchurl, cmake, perl, zlib }:
stdenv.mkDerivation rec {
pname = "libzip";
version = "1.6.1";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
sha256 = "120xgf7cgjmz9d3yp10lks6lhkgxqb4skbmbiiwf46gx868qxsq6";
};
# Fix pkgconfig file paths
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}#'
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake perl ];
propagatedBuildInputs = [ zlib ];
preCheck = ''
# regress/runtest is a generated file
patchShebangs regress
'';
meta = with stdenv.lib; {
homepage = "https://www.nih.at/libzip";
description = "A C library for reading, creating and modifying zip archives";
license = licenses.bsd3;
platforms = platforms.unix;
};
}