From 87c1a24c477a3665d40831d2c537c7e6d3f54cad Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Mon, 5 Apr 2021 20:37:17 +0200 Subject: [PATCH] libzip: install man-pages and add optionas for three optional dependencies (#118464) Co-authored-by: Sandro --- pkgs/development/libraries/libzip/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libzip/default.nix b/pkgs/development/libraries/libzip/default.nix index ddefa16c2c1d..a3f7f3ef5f6f 100644 --- a/pkgs/development/libraries/libzip/default.nix +++ b/pkgs/development/libraries/libzip/default.nix @@ -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"; }; }