at 22.05-pre 34 lines 839 B view raw
1{ lib, stdenv, fetchFromGitHub 2, cmake, pkg-config 3, withZlibCompat ? false 4}: 5 6stdenv.mkDerivation rec { 7 pname = "zlib-ng"; 8 version = "2.0.5"; 9 10 src = fetchFromGitHub { 11 owner = "zlib-ng"; 12 repo = "zlib-ng"; 13 rev = version; 14 sha256 = "sha256-KvV1XtPoagqPmijdr20eejsXWG7PRjMUwGPLXazqUHM="; 15 }; 16 17 outputs = [ "out" "dev" "bin" ]; 18 19 nativeBuildInputs = [ cmake pkg-config ]; 20 21 cmakeFlags = [ 22 "-DCMAKE_INSTALL_PREFIX=/" 23 "-DBUILD_SHARED_LIBS=ON" 24 "-DINSTALL_UTILS=ON" 25 ] ++ lib.optionals withZlibCompat [ "-DZLIB_COMPAT=ON" ]; 26 27 meta = with lib; { 28 description = "zlib data compression library for the next generation systems"; 29 homepage = "https://github.com/zlib-ng/zlib-ng"; 30 license = licenses.zlib; 31 platforms = platforms.all; 32 maintainers = with maintainers; [ izorkin ]; 33 }; 34}