2024-06-23 18:47:25 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake
|
2024-06-09 19:43:11 +00:00
|
|
|
, valgrind, testers
|
2018-12-13 20:39:04 +00:00
|
|
|
}:
|
2015-01-13 22:54:02 +00:00
|
|
|
|
2024-06-09 12:07:44 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-05-03 07:19:06 +00:00
|
|
|
pname = "lz4";
|
2024-09-12 01:20:59 +00:00
|
|
|
version = "1.10.0";
|
2015-01-13 22:54:02 +00:00
|
|
|
|
2015-04-07 15:35:38 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-06-09 12:07:44 +00:00
|
|
|
repo = "lz4";
|
|
|
|
owner = "lz4";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-09-12 01:20:59 +00:00
|
|
|
hash = "sha256-/dG1n59SKBaEBg72pAWltAtVmJ2cXxlFFhP+klrkTos=";
|
2015-01-13 22:54:02 +00:00
|
|
|
};
|
|
|
|
|
2024-06-09 12:02:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
2024-07-30 16:31:23 +00:00
|
|
|
buildInputs = lib.optionals finalAttrs.finalPackage.doCheck [
|
2024-06-09 12:07:44 +00:00
|
|
|
valgrind
|
|
|
|
];
|
2024-06-09 12:02:12 +00:00
|
|
|
|
2024-06-09 19:42:22 +00:00
|
|
|
outputs = [ "dev" "lib" "man" "out" ];
|
2024-06-09 12:02:12 +00:00
|
|
|
|
|
|
|
cmakeDir = "../build/cmake";
|
|
|
|
cmakeBuildDir = "build-dist";
|
2015-01-13 22:54:02 +00:00
|
|
|
|
2015-07-30 16:44:43 +00:00
|
|
|
doCheck = false; # tests take a very long time
|
2015-01-20 06:31:00 +00:00
|
|
|
checkTarget = "test";
|
|
|
|
|
2024-06-09 19:43:11 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
version = "v${finalAttrs.version}";
|
|
|
|
};
|
|
|
|
pkg-config = testers.hasPkgConfigModules {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
moduleNames = [ "liblz4" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-01-13 22:54:02 +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.
|
|
|
|
'';
|
2020-03-12 20:54:07 +00:00
|
|
|
homepage = "https://lz4.github.io/lz4/";
|
2015-01-13 22:54:02 +00:00
|
|
|
license = with licenses; [ bsd2 gpl2Plus ];
|
2019-11-12 19:47:47 +00:00
|
|
|
platforms = platforms.all;
|
2024-06-09 19:43:11 +00:00
|
|
|
mainProgram = "lz4";
|
2024-06-24 03:57:47 +00:00
|
|
|
maintainers = [ maintainers.tobim ];
|
2015-01-13 22:54:02 +00:00
|
|
|
};
|
2024-06-09 12:07:44 +00:00
|
|
|
})
|