2024-07-27 06:49:29 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake
|
|
|
|
, valgrind, testers
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lz4";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "1.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-07-27 06:49:29 +00:00
|
|
|
repo = "lz4";
|
|
|
|
owner = "lz4";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-/dG1n59SKBaEBg72pAWltAtVmJ2cXxlFFhP+klrkTos=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = lib.optionals finalAttrs.finalPackage.doCheck [
|
2024-07-27 06:49:29 +00:00
|
|
|
valgrind
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
outputs = [ "dev" "lib" "man" "out" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cmakeDir = "../build/cmake";
|
|
|
|
cmakeBuildDir = "build-dist";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false; # tests take a very long time
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
version = "v${finalAttrs.version}";
|
|
|
|
};
|
|
|
|
pkg-config = testers.hasPkgConfigModules {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
moduleNames = [ "liblz4" ];
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extremely fast compression algorithm";
|
|
|
|
longDescription = ''
|
|
|
|
Very fast lossless compression algorithm, providing compression speed
|
|
|
|
at 400 MB/s per core, with near-linear scalability for multi-threaded
|
|
|
|
applications. It also features an extremely fast decoder, with speed in
|
|
|
|
multiple GB/s per core, typically reaching RAM speed limits on
|
|
|
|
multi-core systems.
|
|
|
|
'';
|
|
|
|
homepage = "https://lz4.github.io/lz4/";
|
|
|
|
license = with licenses; [ bsd2 gpl2Plus ];
|
|
|
|
platforms = platforms.all;
|
2024-07-27 06:49:29 +00:00
|
|
|
mainProgram = "lz4";
|
|
|
|
maintainers = [ maintainers.tobim ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-07-27 06:49:29 +00:00
|
|
|
})
|