diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/compression')
-rw-r--r-- | nixpkgs/pkgs/tools/compression/bzip2/1_1.nix | 45 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/bzip2/default.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/dtrx/default.nix | 17 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/gzip/default.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/hactool/default.nix | 10 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/lzfse/default.nix | 14 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/lzip/default.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/pixz/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/xz/default.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/zstd/default.nix | 28 |
10 files changed, 109 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix b/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix new file mode 100644 index 00000000000..3f6105ca507 --- /dev/null +++ b/nixpkgs/pkgs/tools/compression/bzip2/1_1.nix @@ -0,0 +1,45 @@ +{ stdenv +, fetchFromGitLab +, meson +, python3 +, ninja +}: + +stdenv.mkDerivation rec { + pname = "bzip2-unstable"; + version = "2020-08-11"; + + src = fetchFromGitLab { + owner = "federicomenaquintero"; + repo = "bzip2"; + rev = "15255b553e7c095fb7a26d4dc5819a11352ebba1"; + sha256 = "sha256-BAyz35D62LWi47B/gNcCSKpdaECHBGSpt21vtnk3fKs="; + }; + + postPatch = '' + patchShebangs install_links.py + ''; + + nativeBuildInputs = [ + meson + python3 + ninja + ]; + + outputs = [ "bin" "dev" "out" "man" ]; + + mesonFlags = [ + "-Ddocs=disabled" + ]; + + strictDeps = true; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "High-quality data compression program"; + license = licenses.bsdOriginal; + platforms = platforms.all; + maintainers = []; + }; +} diff --git a/nixpkgs/pkgs/tools/compression/bzip2/default.nix b/nixpkgs/pkgs/tools/compression/bzip2/default.nix index 41dcd54ecdb..3e20258cbbe 100644 --- a/nixpkgs/pkgs/tools/compression/bzip2/default.nix +++ b/nixpkgs/pkgs/tools/compression/bzip2/default.nix @@ -3,6 +3,11 @@ , autoreconfHook }: +# 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 = "bzip2"; version = "1.0.6.0.1"; diff --git a/nixpkgs/pkgs/tools/compression/dtrx/default.nix b/nixpkgs/pkgs/tools/compression/dtrx/default.nix index edca969a1e8..81a446066d9 100644 --- a/nixpkgs/pkgs/tools/compression/dtrx/default.nix +++ b/nixpkgs/pkgs/tools/compression/dtrx/default.nix @@ -1,18 +1,15 @@ {stdenv, lib, fetchurl, pythonPackages -, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, cabextract, unrar, unshield +, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield , bzip2, xz, lzip -# unsafe: -# ,p7zip -# unzip is no longer handled by p7zip, since it's unsafe -, unzipSupport ? true +# unzip is handled by p7zip +, unzipSupport ? false , unrarSupport ? false }: let - # p7zip - archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip cabextract unshield ] - ++ lib.optional (unzipSupport) unzip - ++ lib.optional (unrarSupport) unrar - ++ [ bzip2 xz lzip ]); + archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ] + ++ lib.optional (unzipSupport) unzip + ++ lib.optional (unrarSupport) unrar + ++ [ bzip2 xz lzip ]); in pythonPackages.buildPythonApplication rec { pname = "dtrx"; diff --git a/nixpkgs/pkgs/tools/compression/gzip/default.nix b/nixpkgs/pkgs/tools/compression/gzip/default.nix index eb680ff8a06..9628e100c1c 100644 --- a/nixpkgs/pkgs/tools/compression/gzip/default.nix +++ b/nixpkgs/pkgs/tools/compression/gzip/default.nix @@ -4,6 +4,11 @@ , writeText }: +# 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 = "gzip"; version = "1.10"; diff --git a/nixpkgs/pkgs/tools/compression/hactool/default.nix b/nixpkgs/pkgs/tools/compression/hactool/default.nix index 77382d980e5..d34ca73556b 100644 --- a/nixpkgs/pkgs/tools/compression/hactool/default.nix +++ b/nixpkgs/pkgs/tools/compression/hactool/default.nix @@ -1,20 +1,22 @@ { stdenv, fetchFromGitHub }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "hactool"; - version = "1.3.3"; + version = "1.4.0"; src = fetchFromGitHub { owner = "SciresM"; repo = "hactool"; - rev = "1.3.3"; - sha256 = "1qb51fck7liqc1ridms8wdlzgbdbvp6iv4an8jvmzhcj5p5xq631"; + rev = version; + sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d"; }; preBuild = '' mv config.mk.template config.mk ''; + makeFlags = stdenv.lib.optionals stdenv.isDarwin [ "CC=cc" ]; + installPhase = '' install -D hactool $out/bin/hactool ''; diff --git a/nixpkgs/pkgs/tools/compression/lzfse/default.nix b/nixpkgs/pkgs/tools/compression/lzfse/default.nix index 72560c1d9ae..bd97620dba6 100644 --- a/nixpkgs/pkgs/tools/compression/lzfse/default.nix +++ b/nixpkgs/pkgs/tools/compression/lzfse/default.nix @@ -1,19 +1,17 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, cmake }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "lzfse"; - version = "2017-03-08"; + version = "1.0"; src = fetchFromGitHub { owner = "lzfse"; repo = "lzfse"; - rev = "88e2d27"; + rev = "lzfse-${version}"; sha256 = "1mfh6y6vpvxsdwmqmfbkqkwvxc0pz2dqqc72c6fk9sbsrxxaghd5"; }; - makeFlags = [ "INSTALL_PREFIX=$(out)" ]; - - enableParallelBuilding = false; #bug + nativeBuildInputs = [ cmake ]; meta = with stdenv.lib; { homepage = "https://github.com/lzfse/lzfse"; @@ -23,7 +21,7 @@ stdenv.mkDerivation { 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.linux; + platforms = platforms.unix; license = licenses.bsd3; maintainers = with maintainers; [ ]; }; diff --git a/nixpkgs/pkgs/tools/compression/lzip/default.nix b/nixpkgs/pkgs/tools/compression/lzip/default.nix index 62f57a8cca7..e55af8b94ed 100644 --- a/nixpkgs/pkgs/tools/compression/lzip/default.nix +++ b/nixpkgs/pkgs/tools/compression/lzip/default.nix @@ -1,5 +1,10 @@ { stdenv, fetchurl, texinfo }: +# 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.21"; diff --git a/nixpkgs/pkgs/tools/compression/pixz/default.nix b/nixpkgs/pkgs/tools/compression/pixz/default.nix index 7eca80f8400..c7b4b46328d 100644 --- a/nixpkgs/pkgs/tools/compression/pixz/default.nix +++ b/nixpkgs/pkgs/tools/compression/pixz/default.nix @@ -5,7 +5,7 @@ }: stdenv.mkDerivation rec { baseName = "pixz"; - version = "1.0.6"; + version = "1.0.7"; name = "${baseName}-${version}"; nativeBuildInputs = [ pkgconfig ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { owner = "vasi"; repo = baseName; rev = "v${version}"; - sha256 = "0q61wqg2yxrgd4nc7256mf7izp92is29ll3rax1cxr6fj9jrd8b7"; + sha256 = "163axxs22w7pghr786hda22mnlpvmi50hzhfr9axwyyjl9n41qs2"; }; preConfigure = '' ./autogen.sh diff --git a/nixpkgs/pkgs/tools/compression/xz/default.nix b/nixpkgs/pkgs/tools/compression/xz/default.nix index 545384c396d..5cf88288d81 100644 --- a/nixpkgs/pkgs/tools/compression/xz/default.nix +++ b/nixpkgs/pkgs/tools/compression/xz/default.nix @@ -1,5 +1,10 @@ { stdenv, fetchurl, enableStatic ? false }: +# 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 { name = "xz-5.2.5"; diff --git a/nixpkgs/pkgs/tools/compression/zstd/default.nix b/nixpkgs/pkgs/tools/compression/zstd/default.nix index 2f89331f92c..8ce434741a5 100644 --- a/nixpkgs/pkgs/tools/compression/zstd/default.nix +++ b/nixpkgs/pkgs/tools/compression/zstd/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep +{ stdenv, fetchFromGitHub, fetchpatch, cmake, bash, gnugrep , fixDarwinDylibNames , file , legacySupport ? false -, enableShared ? true }: +, static ? false +}: stdenv.mkDerivation rec { pname = "zstd"; @@ -17,6 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + buildInputs = [ bash ]; patches = [ ./playtests-darwin.patch @@ -28,8 +30,20 @@ stdenv.mkDerivation rec { # work fine, and I'm not sure how to write the condition. ++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch; + postPatch = stdenv.lib.optionalString (!static) '' + substituteInPlace build/cmake/CMakeLists.txt \ + --replace 'message(SEND_ERROR "You need to build static library to build tests")' "" + substituteInPlace build/cmake/tests/CMakeLists.txt \ + --replace 'libzstd_static' 'libzstd_shared' + sed -i \ + "1aexport ${stdenv.lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/build_/lib" \ + tests/playTests.sh + ''; + cmakeFlags = [ - "-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}" + "-DZSTD_BUILD_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" + "-DZSTD_BUILD_STATIC:BOOL=${if static then "ON" else "OFF"}" + "-DZSTD_PROGRAMS_LINK_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" "-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" "-DZSTD_BUILD_TESTS:BOOL=ON" ]; @@ -43,6 +57,8 @@ stdenv.mkDerivation rec { doCheck = true; checkPhase = '' runHook preCheck + # Patch shebangs for playTests + patchShebangs ../programs/zstdgrep ctest -R playTests # The only relatively fast test. runHook postCheck ''; @@ -50,12 +66,14 @@ stdenv.mkDerivation rec { preInstall = '' substituteInPlace ../programs/zstdgrep \ --replace ":-grep" ":-${gnugrep}/bin/grep" \ - --replace ":-zstdcat" ":-$out/bin/zstdcat" + --replace ":-zstdcat" ":-$bin/bin/zstdcat" substituteInPlace ../programs/zstdless \ - --replace "zstdcat" "$out/bin/zstdcat" + --replace "zstdcat" "$bin/bin/zstdcat" ''; + outputs = [ "bin" "dev" "man" "out" ]; + meta = with stdenv.lib; { description = "Zstandard real-time compression algorithm"; longDescription = '' |