2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fixDarwinDylibNames,
|
|
|
|
pkgsStatic,
|
|
|
|
cmake,
|
|
|
|
testers,
|
2024-05-02 00:46:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "libdeflate";
|
|
|
|
version = "1.20";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebiggers";
|
|
|
|
repo = "libdeflate";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
sha256 = "sha256-kHLdu/Pb94+arj98Jjp57FpvWbAXW49s9cxCA1cf898=";
|
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
static = pkgsStatic.libdeflate;
|
2024-06-30 08:16:52 +00:00
|
|
|
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2024-06-30 08:16:52 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
orivej
|
|
|
|
kaction
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
pkgConfigModules = [ "libdeflate" ];
|
|
|
|
};
|
|
|
|
})
|