2020-12-12 02:04:16 +01:00
|
|
|
{ lib, stdenv
|
|
|
|
, cmake
|
|
|
|
, fetchpatch
|
|
|
|
, fetchurl
|
|
|
|
, perl
|
|
|
|
, zlib
|
2021-04-05 20:37:17 +02:00
|
|
|
, groff
|
|
|
|
, withBzip2 ? false
|
|
|
|
, bzip2
|
|
|
|
, withLZMA ? false
|
|
|
|
, xz
|
|
|
|
, withOpenssl ? false
|
|
|
|
, openssl
|
2020-12-12 02:04:16 +01:00
|
|
|
}:
|
2007-11-11 17:19:00 +01:00
|
|
|
|
2012-02-09 15:09:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libzip";
|
2020-12-12 02:04:16 +01:00
|
|
|
version = "1.7.3";
|
2015-04-06 12:11:51 +02:00
|
|
|
|
2009-04-22 01:18:09 +02:00
|
|
|
src = fetchurl {
|
2021-04-05 20:37:17 +02:00
|
|
|
url = "https://libzip.org/download/${pname}-${version}.tar.gz";
|
2020-12-12 02:04:16 +01:00
|
|
|
sha256 = "1k5rihiz7m1ahhjzcbq759hb9crzqkgw78pkxga118y5a32pc8hf";
|
2009-04-22 01:18:09 +02:00
|
|
|
};
|
2015-04-06 12:11:51 +02:00
|
|
|
|
2020-12-12 02:04:16 +01:00
|
|
|
# Remove in next release
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/nih-at/libzip/commit/351201419d79b958783c0cfc7c370243165523ac.patch";
|
|
|
|
sha256 = "0d93z98ki0yiaza93268cxkl35y1r7ll9f7l8sivx3nfxj2c1n8a";
|
|
|
|
})
|
|
|
|
];
|
2018-08-08 20:55:33 +02:00
|
|
|
|
2021-04-05 20:37:17 +02:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
2016-04-25 13:51:29 +02:00
|
|
|
|
2021-04-05 20:37:17 +02:00
|
|
|
nativeBuildInputs = [ cmake perl groff ];
|
2012-02-09 15:22:13 +01:00
|
|
|
propagatedBuildInputs = [ zlib ];
|
2021-04-05 20:37:17 +02:00
|
|
|
buildInputs = lib.optionals withLZMA [ xz ]
|
|
|
|
++ lib.optionals withBzip2 [ bzip2 ]
|
|
|
|
++ lib.optionals withOpenssl [ openssl ];
|
2007-11-11 17:19:00 +01:00
|
|
|
|
2018-08-08 20:55:33 +02:00
|
|
|
preCheck = ''
|
2019-11-13 21:58:39 +01:00
|
|
|
# regress/runtest is a generated file
|
2018-08-08 20:55:33 +02:00
|
|
|
patchShebangs regress
|
2016-04-27 02:46:36 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2021-04-05 20:37:17 +02:00
|
|
|
homepage = "https://libzip.org/";
|
2009-04-22 01:18:09 +02:00
|
|
|
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;
|
2021-04-05 20:37:17 +02:00
|
|
|
changelog = "https://github.com/nih-at/libzip/blob/v${version}/NEWS.md";
|
2009-04-22 01:18:09 +02:00
|
|
|
};
|
2007-11-11 17:19:00 +01:00
|
|
|
}
|