about summary refs log tree commit diff
path: root/pkgs/by-name/lz
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/lz')
-rw-r--r--pkgs/by-name/lz/lz4/package.nix58
-rw-r--r--pkgs/by-name/lz/lzbench/package.nix28
-rw-r--r--pkgs/by-name/lz/lzfse/package.nix29
-rw-r--r--pkgs/by-name/lz/lzham/package.nix28
-rw-r--r--pkgs/by-name/lz/lzip/lzip-setup-hook.sh5
-rw-r--r--pkgs/by-name/lz/lzip/mingw-install-exe-file.patch13
-rw-r--r--pkgs/by-name/lz/lzip/package.nix42
-rw-r--r--pkgs/by-name/lz/lziprecover/package.nix32
-rw-r--r--pkgs/by-name/lz/lzlib/package.nix2
-rw-r--r--pkgs/by-name/lz/lzo/package.nix39
-rw-r--r--pkgs/by-name/lz/lzop/package.nix22
11 files changed, 297 insertions, 1 deletions
diff --git a/pkgs/by-name/lz/lz4/package.nix b/pkgs/by-name/lz/lz4/package.nix
new file mode 100644
index 000000000000..f729e9160427
--- /dev/null
+++ b/pkgs/by-name/lz/lz4/package.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, valgrind, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "lz4";
+  version = "1.10.0";
+
+  src = fetchFromGitHub {
+    repo = "lz4";
+    owner = "lz4";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-/dG1n59SKBaEBg72pAWltAtVmJ2cXxlFFhP+klrkTos=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = lib.optionals finalAttrs.finalPackage.doCheck [
+    valgrind
+  ];
+
+  outputs = [ "dev" "lib" "man" "out" ];
+
+  cmakeDir = "../build/cmake";
+  cmakeBuildDir = "build-dist";
+
+  doCheck = false; # tests take a very long time
+  checkTarget = "test";
+
+  passthru.tests = {
+    version = testers.testVersion {
+      package = finalAttrs.finalPackage;
+      version = "v${finalAttrs.version}";
+    };
+    pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+      moduleNames = [ "liblz4" ];
+    };
+  };
+
+  meta = with 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://lz4.github.io/lz4/";
+    license = with licenses; [ bsd2 gpl2Plus ];
+    platforms = platforms.all;
+    mainProgram = "lz4";
+    maintainers = [ maintainers.tobim ];
+  };
+})
diff --git a/pkgs/by-name/lz/lzbench/package.nix b/pkgs/by-name/lz/lzbench/package.nix
new file mode 100644
index 000000000000..c35f738b2bde
--- /dev/null
+++ b/pkgs/by-name/lz/lzbench/package.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "lzbench";
+  version = "1.8.1";
+
+  src = fetchFromGitHub {
+    owner = "inikep";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "19zlvcjb1qg4fx30rrp6m650660y35736j8szvdxmqh9ipkisyia";
+  };
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp lzbench $out/bin
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "In-memory benchmark of open-source LZ77/LZSS/LZMA compressors";
+    license = licenses.free;
+    platforms = platforms.all;
+    mainProgram = "lzbench";
+  };
+}
diff --git a/pkgs/by-name/lz/lzfse/package.nix b/pkgs/by-name/lz/lzfse/package.nix
new file mode 100644
index 000000000000..dd2144a16849
--- /dev/null
+++ b/pkgs/by-name/lz/lzfse/package.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "lzfse";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "lzfse";
+    repo = "lzfse";
+    rev = "lzfse-${version}";
+    sha256 = "1mfh6y6vpvxsdwmqmfbkqkwvxc0pz2dqqc72c6fk9sbsrxxaghd5";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://github.com/lzfse/lzfse";
+    description = "Reference C implementation of the LZFSE compressor";
+    longDescription = ''
+      This is a reference C implementation of the LZFSE compressor introduced in the Compression library with OS X 10.11 and iOS 9.
+      LZFSE is a Lempel-Ziv style data compression algorithm using Finite State Entropy coding.
+      It targets similar compression rates at higher compression and decompression speed compared to deflate using zlib.
+    '';
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+    maintainers = [ ];
+    mainProgram = "lzfse";
+  };
+}
diff --git a/pkgs/by-name/lz/lzham/package.nix b/pkgs/by-name/lz/lzham/package.nix
new file mode 100644
index 000000000000..7d2879f63cd8
--- /dev/null
+++ b/pkgs/by-name/lz/lzham/package.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake } :
+
+stdenv.mkDerivation rec {
+  pname = "lzham";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "richgel999";
+    repo = "lzham_codec";
+    rev = "v${lib.replaceStrings ["."] ["_"] version}_release";
+    sha256 = "14c1zvzmp1ylp4pgayfdfk1kqjb23xj4f7ll1ra7b18wjxc9ja1v";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ../bin_linux/lzhamtest $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Lossless data compression codec with LZMA-like ratios but 1.5x-8x faster decompression speed";
+    mainProgram = "lzhamtest";
+    homepage = "https://github.com/richgel999/lzham_codec";
+    license = with licenses; [ mit ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/by-name/lz/lzip/lzip-setup-hook.sh b/pkgs/by-name/lz/lzip/lzip-setup-hook.sh
new file mode 100644
index 000000000000..092ad7737dd1
--- /dev/null
+++ b/pkgs/by-name/lz/lzip/lzip-setup-hook.sh
@@ -0,0 +1,5 @@
+lzipUnpackCmdHook() {
+    [[ "$1" = *.tar.lz ]] && tar --lzip -xf "$1"
+}
+
+unpackCmdHooks+=(lzipUnpackCmdHook)
diff --git a/pkgs/by-name/lz/lzip/mingw-install-exe-file.patch b/pkgs/by-name/lz/lzip/mingw-install-exe-file.patch
new file mode 100644
index 000000000000..b2b4b2be067e
--- /dev/null
+++ b/pkgs/by-name/lz/lzip/mingw-install-exe-file.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index d07ad5a..1c15203 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -64,7 +64,7 @@ install-strip-compress : install-bin-strip install-info-compress install-man-com
+ 
+ install-bin : all
+ 	if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
+-	$(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)"
++	$(INSTALL_PROGRAM) ./$(progname).exe "$(DESTDIR)$(bindir)/$(progname).exe"
+ 
+ install-bin-strip : all
+ 	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin
diff --git a/pkgs/by-name/lz/lzip/package.nix b/pkgs/by-name/lz/lzip/package.nix
new file mode 100644
index 000000000000..80d247fbc9ce
--- /dev/null
+++ b/pkgs/by-name/lz/lzip/package.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "lzip";
+  version = "1.24.1";
+  outputs = [ "out" "man" "info" ];
+
+  src = fetchurl {
+    url = "mirror://savannah/lzip/${pname}-${version}.tar.gz";
+    hash = "sha256-MMnLagYF9HnElsN262KaSLChaW0WfjweCQxd76SBsWI=";
+  };
+
+  patches = lib.optionals stdenv.hostPlatform.isMinGW [
+    ./mingw-install-exe-file.patch
+  ];
+
+  configureFlags = [
+    "CPPFLAGS=-DNDEBUG"
+    "CFLAGS=-O3"
+    "CXXFLAGS=-O3"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+  ];
+
+  setupHook = ./lzip-setup-hook.sh;
+
+  doCheck = true;
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://www.nongnu.org/lzip/lzip.html";
+    description = "Lossless data compressor based on the LZMA algorithm";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with maintainers; [ vlaci ];
+    platforms = lib.platforms.all;
+    mainProgram = "lzip";
+  };
+}
diff --git a/pkgs/by-name/lz/lziprecover/package.nix b/pkgs/by-name/lz/lziprecover/package.nix
new file mode 100644
index 000000000000..c3f2ca738c7d
--- /dev/null
+++ b/pkgs/by-name/lz/lziprecover/package.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, lzip }:
+
+stdenv.mkDerivation rec {
+  pname = "lziprecover";
+  version = "1.24";
+
+  src = fetchurl {
+    url = "mirror://savannah/lzip/lziprecover/${pname}-${version}.tar.gz";
+    sha256 = "sha256-HWmc+u/pLrJiSjZSWAvK/gu7mP54GMJebegjvN0NRY8=";
+  };
+
+  configureFlags = [
+    "CPPFLAGS=-DNDEBUG"
+    "CFLAGS=-O3"
+    "CXXFLAGS=-O3"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [ lzip ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://www.nongnu.org/lzip/lziprecover.html";
+    description = "Data recovery tool for lzip compressed files";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with maintainers; [ vlaci ];
+    platforms = lib.platforms.all;
+    mainProgram = "lziprecover";
+  };
+}
diff --git a/pkgs/by-name/lz/lzlib/package.nix b/pkgs/by-name/lz/lzlib/package.nix
index b25f76871a0c..c44456bb45ca 100644
--- a/pkgs/by-name/lz/lzlib/package.nix
+++ b/pkgs/by-name/lz/lzlib/package.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: {
     # hash from release email
   };
 
-  postPatch = lib.optionalString stdenv.isDarwin ''
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
     substituteInPlace Makefile.in --replace '-Wl,--soname=' '-Wl,-install_name,$(out)/lib/'
   '';
 
diff --git a/pkgs/by-name/lz/lzo/package.nix b/pkgs/by-name/lz/lzo/package.nix
new file mode 100644
index 000000000000..43d551819a65
--- /dev/null
+++ b/pkgs/by-name/lz/lzo/package.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, updateAutotoolsGnuConfigScriptsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "lzo";
+  version = "2.10";
+
+  src = fetchurl {
+    url = "https://www.oberhumer.com/opensource/lzo/download/${pname}-${version}.tar.gz";
+    sha256 = "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60";
+  };
+
+  nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
+
+  configureFlags = lib.optional (!stdenv.hostPlatform.isStatic) "--enable-shared" ;
+
+  enableParallelBuilding = true;
+
+  doCheck = true; # not cross;
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Real-time data (de)compression library";
+    longDescription = ''
+      LZO is a portable lossless data compression library written in ANSI C.
+      Both the source code and the compressed data format are designed to be
+      portable across platforms.
+      LZO offers pretty fast compression and *extremely* fast decompression.
+      While it favours speed over compression ratio, it includes slower
+      compression levels achieving a quite competitive compression ratio
+      while still decompressing at this very high speed.
+    '';
+
+    homepage = "http://www.oberhumer.com/opensource/lzo";
+    license = licenses.gpl2Plus;
+
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/by-name/lz/lzop/package.nix b/pkgs/by-name/lz/lzop/package.nix
new file mode 100644
index 000000000000..d2daeb51d514
--- /dev/null
+++ b/pkgs/by-name/lz/lzop/package.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, lzo }:
+
+stdenv.mkDerivation rec {
+  pname = "lzop";
+  version = "1.04";
+
+  src = fetchurl {
+    url = "https://www.lzop.org/download/lzop-${version}.tar.gz";
+    sha256 = "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky";
+  };
+
+  buildInputs = [ lzo ];
+
+  meta = with lib; {
+    homepage = "http://www.lzop.org";
+    description = "Fast file compressor";
+    maintainers = [ ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    mainProgram = "lzop";
+  };
+}