diff options
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r-- | pkgs/tools/compression/dtrx/default.nix | 69 | ||||
-rw-r--r-- | pkgs/tools/compression/lrzip/default.upstream | 8 | ||||
-rw-r--r-- | pkgs/tools/compression/lzip/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/compression/lziprecover/default.nix | 31 | ||||
-rw-r--r-- | pkgs/tools/compression/nx2elf/default.nix | 12 | ||||
-rw-r--r-- | pkgs/tools/compression/zstd/default.nix | 17 | ||||
-rw-r--r-- | pkgs/tools/compression/zstd/playtests-darwin.patch | 9 |
7 files changed, 95 insertions, 60 deletions
diff --git a/pkgs/tools/compression/dtrx/default.nix b/pkgs/tools/compression/dtrx/default.nix index 6c4f2f6e854ee..392c2b960f277 100644 --- a/pkgs/tools/compression/dtrx/default.nix +++ b/pkgs/tools/compression/dtrx/default.nix @@ -1,45 +1,52 @@ -{ lib, fetchurl, python2Packages -, gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield -, bzip2, xz, lzip -# unzip is handled by p7zip +{ lib +, fetchFromGitHub +, python3Packages +, gnutar +, unzip +, lhasa +, rpm +, binutils +, cpio +, gzip +, p7zip +, cabextract +, unrar +, unshield +, bzip2 +, xz +, lzip , unzipSupport ? false -, unrarSupport ? false }: +, unrarSupport ? false +}: -let - archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ] - ++ lib.optional (unzipSupport) unzip - ++ lib.optional (unrarSupport) unrar - ++ [ bzip2 xz lzip ]); - -in python2Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "dtrx"; - version = "7.1"; + version = "8.2.1"; - src = fetchurl { - url = "https://brettcsmith.org/2007/dtrx/dtrx-${version}.tar.gz"; - sha256 = "15yf4n27zbhvv0byfv3i89wl5zn6jc2wbc69lk5a3m6rx54gx6hw"; + src = fetchFromGitHub { + owner = "dtrx-py"; + repo = "dtrx"; + rev = version; + sha256 = "sha256-ayQ52teXWpw3ZvPhfqxFHxMZatQK9NKv/97ovANFZcE="; }; - postInstall = '' - wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}" - ''; - - checkPhase = '' - python2 tests/compare.py - ''; - - checkInputs = with python2Packages; [ - pyyaml - ]; + postInstall = + let + archivers = lib.makeBinPath ( + [ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield bzip2 xz lzip ] + ++ lib.optional (unzipSupport) unzip + ++ lib.optional (unrarSupport) unrar + ); + in '' + wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}" + ''; - # custom test suite fails - doCheck = false; + buildInputs = [ python3Packages.twine ]; meta = with lib; { description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives"; - homepage = "https://brettcsmith.org/2007/dtrx/"; + homepage = "https://github.com/dtrx-py/dtrx"; license = licenses.gpl3Plus; maintainers = [ maintainers.spwhitt ]; - platforms = platforms.all; }; } diff --git a/pkgs/tools/compression/lrzip/default.upstream b/pkgs/tools/compression/lrzip/default.upstream deleted file mode 100644 index 1b83459863745..0000000000000 --- a/pkgs/tools/compression/lrzip/default.upstream +++ /dev/null @@ -1,8 +0,0 @@ -url http://ck.kolivas.org/apps/lrzip/ -version_link '[.]tar[.]bz2$' - -do_overwrite () { - ensure_hash - set_var_value version "$CURRENT_VERSION" - set_var_value sha256 "$CURRENT_HASH" -} diff --git a/pkgs/tools/compression/lzip/default.nix b/pkgs/tools/compression/lzip/default.nix index aa6b6d31a8972..17abb6503c9be 100644 --- a/pkgs/tools/compression/lzip/default.nix +++ b/pkgs/tools/compression/lzip/default.nix @@ -20,18 +20,19 @@ stdenv.mkDerivation rec { "CPPFLAGS=-DNDEBUG" "CFLAGS=-O3" "CXXFLAGS=-O3" - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) - "CXX=${stdenv.cc.targetPrefix}c++"; + "CXX=${stdenv.cc.targetPrefix}c++" + ]; setupHook = ./lzip-setup-hook.sh; doCheck = true; enableParallelBuilding = true; - meta = { + meta = with lib; { homepage = "https://www.nongnu.org/lzip/lzip.html"; description = "A lossless data compressor based on the LZMA algorithm"; - license = lib.licenses.gpl3Plus; + license = lib.licenses.gpl2Plus; + maintainers = with maintainers; [ vlaci ]; platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/compression/lziprecover/default.nix b/pkgs/tools/compression/lziprecover/default.nix new file mode 100644 index 0000000000000..e322a19059017 --- /dev/null +++ b/pkgs/tools/compression/lziprecover/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchurl, lzip }: + +stdenv.mkDerivation rec { + pname = "lziprecover"; + version = "1.23"; + + src = fetchurl { + url = "mirror://savannah/lzip/lziprecover/${pname}-${version}.tar.gz"; + sha256 = "sha256-8pgEF38G3VHD+lJhWuGYp2ACts6Nlhw1dVRsN0D0tXI="; + }; + + configureFlags = [ + "CPPFLAGS=-DNDEBUG" + "CFLAGS=-O3" + "CXXFLAGS=-O3" + "CXX=${stdenv.cc.targetPrefix}c++" + ]; + + doCheck = true; + checkInputs = [ 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; + }; +} diff --git a/pkgs/tools/compression/nx2elf/default.nix b/pkgs/tools/compression/nx2elf/default.nix index 8b7f094bf39a1..d4963487ada18 100644 --- a/pkgs/tools/compression/nx2elf/default.nix +++ b/pkgs/tools/compression/nx2elf/default.nix @@ -2,23 +2,19 @@ stdenv.mkDerivation rec { pname = "nx2elf"; - version = "unstable-2020-05-26"; + version = "unstable-2021-11-21"; src = fetchFromGitHub { owner = "shuffle2"; repo = "nx2elf"; - rev = "7212e82a77b84fcc18ef2d050970350dbf63649b"; - sha256 = "1j4k5s86c6ixa3wdqh4cfm31fxabwn6jcjc6pippx8mii98ac806"; + rev = "735aaa0648a5a6c996b48add9465db86524999f6"; + sha256 = "sha256-cS8FFIEgDWva0j9JXhS+s7Y4Oh+mNhFaKRI7BF2hqvs="; }; buildInputs = [ lz4 ]; postPatch = '' - # This project does not comply with C++14 standards, and compilation on that fails. - # This does however succesfully compile with the gnu++20 standard. - substituteInPlace Makefile --replace "c++14" "gnu++20" - - # pkg-config is not supported, so we'll manually use a non-ancient version of lz4 + # pkg-config is not supported, so we'll manually devendor lz4 cp ${lz4.src}/lib/lz4.{h,c} . ''; diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 1f9b4a505ac49..0bff5110c935d 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -7,17 +7,18 @@ # these need to be ran on the host, thus disable when cross-compiling , buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform , doCheck ? stdenv.hostPlatform == stdenv.buildPlatform +, nix-update-script }: stdenv.mkDerivation rec { pname = "zstd"; - version = "1.5.0"; + version = "1.5.2"; src = fetchFromGitHub { owner = "facebook"; repo = "zstd"; rev = "v${version}"; - sha256 = "0icc0x89c35rq5bxd4d241vqxnz2i1qj2wwy01xls63p0z93brj7"; + sha256 = "sha256-yJvhcysxcbUGuDOqe/TQ3Y5xyM2AUw6r1THSHOqmUy0="; }; nativeBuildInputs = [ cmake ] @@ -28,12 +29,6 @@ stdenv.mkDerivation rec { # This patches makes sure we do not attempt to use the MD5 implementation # of the host platform when running the tests ./playtests-darwin.patch - - # Fixes linking for static builds - (fetchpatch { - url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch"; - sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; - }) ]; postPatch = lib.optionalString (!static) '' @@ -90,6 +85,12 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.hostPlatform.isUnix "man" ++ [ "out" ]; + passthru = { + updateScript = nix-update-script { + attrPath = pname; + }; + }; + meta = with lib; { description = "Zstandard real-time compression algorithm"; longDescription = '' diff --git a/pkgs/tools/compression/zstd/playtests-darwin.patch b/pkgs/tools/compression/zstd/playtests-darwin.patch index bcb895a697caf..454489a24a126 100644 --- a/pkgs/tools/compression/zstd/playtests-darwin.patch +++ b/pkgs/tools/compression/zstd/playtests-darwin.patch @@ -1,6 +1,6 @@ --- a/tests/playTests.sh +++ b/tests/playTests.sh -@@ -112,22 +112,12 @@ case "$OS" in +@@ -112,29 +112,19 @@ case "$OS" in esac case "$UNAME" in @@ -16,6 +16,13 @@ - Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;; -esac + assertSameMTime() { + MT1=$($MTIME "$1") + MT2=$($MTIME "$2") + echo MTIME $MT1 $MT2 + [ "$MT1" = "$MT2" ] || die "mtime on $1 doesn't match mtime on $2 ($MT1 != $MT2)" + } + GET_PERMS="stat -c %a" -case "$UNAME" in - Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;; |