libzip: install man-pages and add optionas for three optional dependencies (#118464)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Daniel Nagy 2021-04-05 20:37:17 +02:00 committed by GitHub
parent 6602e309e1
commit 87c1a24c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,13 @@
, fetchurl
, perl
, zlib
, groff
, withBzip2 ? false
, bzip2
, withLZMA ? false
, xz
, withOpenssl ? false
, openssl
}:
stdenv.mkDerivation rec {
@ -11,7 +18,7 @@ stdenv.mkDerivation rec {
version = "1.7.3";
src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
url = "https://libzip.org/download/${pname}-${version}.tar.gz";
sha256 = "1k5rihiz7m1ahhjzcbq759hb9crzqkgw78pkxga118y5a32pc8hf";
};
@ -23,10 +30,13 @@ stdenv.mkDerivation rec {
})
];
outputs = [ "out" "dev" ];
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ cmake perl ];
nativeBuildInputs = [ cmake perl groff ];
propagatedBuildInputs = [ zlib ];
buildInputs = lib.optionals withLZMA [ xz ]
++ lib.optionals withBzip2 [ bzip2 ]
++ lib.optionals withOpenssl [ openssl ];
preCheck = ''
# regress/runtest is a generated file
@ -34,9 +44,10 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
homepage = "https://www.nih.at/libzip";
homepage = "https://libzip.org/";
description = "A C library for reading, creating and modifying zip archives";
license = licenses.bsd3;
platforms = platforms.unix;
changelog = "https://github.com/nih-at/libzip/blob/v${version}/NEWS.md";
};
}