2023-10-09 19:29:22 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, cmake, pkg-config, gtest
|
2021-04-05 15:23:46 +00:00
|
|
|
, withZlibCompat ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zlib-ng";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.1.7";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zlib-ng";
|
|
|
|
repo = "zlib-ng";
|
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-fNebnLeME0HXUx8M7YfTT0aMJQggEmMs9EbJFWL1zC4=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "bin" ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ gtest ];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=/"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DINSTALL_UTILS=ON"
|
|
|
|
] ++ lib.optionals withZlibCompat [ "-DZLIB_COMPAT=ON" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "zlib data compression library for the next generation systems";
|
|
|
|
homepage = "https://github.com/zlib-ng/zlib-ng";
|
|
|
|
license = licenses.zlib;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ izorkin ];
|
|
|
|
};
|
|
|
|
}
|