From 8257ed81c9cd54f8247759b5d754eea983aa1a43 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 13 Jan 2015 23:54:02 +0100 Subject: [PATCH] Add lz4: very fast lossless compression --- pkgs/tools/compression/lz4/default.nix | 32 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/compression/lz4/default.nix diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix new file mode 100644 index 00000000000..6f7cf5b987a --- /dev/null +++ b/pkgs/tools/compression/lz4/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + # The r127 source still calls itself r126 everywhere, but I'm not going to + # patch over such silly cosmetic oversights in an official release. -- nckx + version = "127"; + name = "lz4-${version}"; + + src = fetchurl { + url = "https://github.com/Cyan4973/lz4/archive/r${version}.tar.gz"; + sha256 = "0hvbbr07j4hfix4dn4xw4fsmkr5s02bj596fn0i15d1i49xby2aj"; + }; + + enableParallelBuilding = true; + + makeFlags = "PREFIX=$(out)"; + + meta = with stdenv.lib; { + 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://code.google.com/p/lz4/; + license = with licenses; [ bsd2 gpl2Plus ]; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fe6b9f53fe..0b5eec0cce2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1710,6 +1710,8 @@ let xz = callPackage ../tools/compression/xz { }; + lz4 = callPackage ../tools/compression/lz4 { }; + lzop = callPackage ../tools/compression/lzop { }; macchanger = callPackage ../os-specific/linux/macchanger { };