18 stdenv.mkDerivation (finalAttrs: {
23 url = "https://libzip.org/download/libzip-${finalAttrs.version}.tar.gz";
24 hash = "sha256-wOb6UqYroR79MCYikNxpcJR67zLgzClO5Q6QBc6sCSo=";
27 outputs = [ "out" "dev" "man" ];
29 nativeBuildInputs = [ cmake perl groff ];
30 propagatedBuildInputs = [ zlib ];
31 buildInputs = lib.optionals withLZMA [ xz ]
32 ++ lib.optionals withBzip2 [ bzip2 ]
33 ++ lib.optionals withOpenssl [ openssl ]
34 ++ lib.optionals withZstd [ zstd ];
36 # Don't build the regression tests because they don't build with
37 # pkgsStatic and are not executed anyway.
38 cmakeFlags = [ "-DBUILD_REGRESS=0" ];
41 # regress/runtest is a generated file
45 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
48 homepage = "https://libzip.org/";
49 description = "C library for reading, creating and modifying zip archives";
50 license = licenses.bsd3;
51 pkgConfigModules = [ "libzip" ];
52 platforms = platforms.unix;
53 changelog = "https://github.com/nih-at/libzip/blob/v${finalAttrs.version}/NEWS.md";