blob: 9f9331b90dd45bb13db550c89ded8634d719086e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ stdenv, fetchurl, cmake, perl, zlib }:
stdenv.mkDerivation rec {
pname = "libzip";
version = "1.5.2";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
sha256 = "05ay8cbm882br0ir2cmzrvdq8q5mr1bnf53l4305xzigpd54lsdy";
};
# 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;
};
}
|