Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
stdenv,
fetchFromGitHub,
fixDarwinDylibNames,
pkgsStatic,
cmake,
zlib,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libdeflate";
version = "1.24";
src = fetchFromGitHub {
owner = "ebiggers";
repo = "libdeflate";
rev = "v${finalAttrs.version}";
hash = "sha256-IaXXm9VrZ0Pgb3yTh1fPKkifJDvCxvCfTH08Sdho0Ko=";
};
cmakeFlags = [
"-DLIBDEFLATE_BUILD_TESTS=ON"
]
++ lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ zlib ];
passthru.tests = {
static = pkgsStatic.libdeflate;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
doCheck = true;
meta = with lib; {
description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
license = licenses.mit;
homepage = "https://github.com/ebiggers/libdeflate";
changelog = "https://github.com/ebiggers/libdeflate/blob/v${finalAttrs.version}/NEWS.md";
platforms = platforms.unix ++ platforms.windows;
maintainers = with maintainers; [
orivej
kaction
];
pkgConfigModules = [ "libdeflate" ];
};
})