about summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r--pkgs/tools/archivers/7zz/default.nix6
-rwxr-xr-xpkgs/tools/archivers/7zz/update.sh43
-rw-r--r--pkgs/tools/archivers/arc_unpacker/default.nix2
-rw-r--r--pkgs/tools/archivers/cpio/default.nix2
-rw-r--r--pkgs/tools/archivers/ctrtool/default.nix20
-rw-r--r--pkgs/tools/archivers/gnutar/default.nix5
-rw-r--r--pkgs/tools/archivers/innoextract/default.nix2
-rw-r--r--pkgs/tools/archivers/ndstool/default.nix2
-rw-r--r--pkgs/tools/archivers/p7zip/default.nix2
-rw-r--r--pkgs/tools/archivers/payload-dumper-go/default.nix2
-rw-r--r--pkgs/tools/archivers/runzip/default.nix2
-rw-r--r--pkgs/tools/archivers/s-tar/default.nix2
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix3
-rw-r--r--pkgs/tools/archivers/snzip/default.nix2
-rw-r--r--pkgs/tools/archivers/torrent7z/default.nix2
-rw-r--r--pkgs/tools/archivers/unar/default.nix2
-rw-r--r--pkgs/tools/archivers/unzip/default.nix3
-rw-r--r--pkgs/tools/archivers/wimlib/default.nix2
-rw-r--r--pkgs/tools/archivers/xarchive/default.nix2
-rw-r--r--pkgs/tools/archivers/zip/default.nix2
-rw-r--r--pkgs/tools/archivers/zip/fix-time.h-not-included.patch10
21 files changed, 53 insertions, 65 deletions
diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix
index f4eb5e9327fe5..c24176263dfec 100644
--- a/pkgs/tools/archivers/7zz/default.nix
+++ b/pkgs/tools/archivers/7zz/default.nix
@@ -25,13 +25,13 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "7zz";
-  version = "24.05";
+  version = "24.06";
 
   src = fetchurl {
     url = "https://7-zip.org/a/7z${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}-src.tar.xz";
     hash = {
-      free = "sha256-yYq3IEV2GeDWwW6KrdpgK2/QOsmDcBpIZvbk6VKZETY=";
-      unfree = "sha256-Y/NBz4C40ofG6UVRmz2g+nVVPIVXKkcbf6bmj5qQt5A=";
+      free = "sha256-X3uqGnJGQpW5MOaTtgWYwwrhS84e+piX7Gc+e8Pll00=";
+      unfree = "sha256-KqFmDHc1JbLthNbNf/BoDHhuwIk7h+TbRGVNy39ayLU=";
     }.${if enableUnfree then "unfree" else "free"};
     downloadToTemp = (!enableUnfree);
     # remove the unRAR related code from the src drv
diff --git a/pkgs/tools/archivers/7zz/update.sh b/pkgs/tools/archivers/7zz/update.sh
index bc3179615d357..1128cedd54913 100755
--- a/pkgs/tools/archivers/7zz/update.sh
+++ b/pkgs/tools/archivers/7zz/update.sh
@@ -1,11 +1,8 @@
 #! /usr/bin/env nix-shell
-#! nix-shell -i bash -p curl xq-xml nix-prefetch
+#! nix-shell -I nixpkgs=./. -i bash -p curl xq-xml common-updater-scripts
 set -euo pipefail
-cd "$(dirname "${BASH_SOURCE[0]}")"
 
-DRV_DIR="$PWD"
-
-OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
+OLD_VERSION="$(nix-instantiate --eval --json --expr 'let pkgs = import ./. {}; in pkgs._7zz.version' | sed 's/"//g')"
 NEW_VERSION="$(curl -H 'Accept: application/rss+xml' 'https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip' | xq -x "substring((/rss/channel/item[link[contains(., 'src.tar.xz')]])[1]/title, 8, 5)")"
 
 echo "comparing versions $OLD_VERSION => $NEW_VERSION"
@@ -14,37 +11,5 @@ if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
     exit 0
 fi
 
-NIXPKGS_ROOT="$(realpath "$DRV_DIR/../../../..")"
-
-echo "getting free source hash"
-OLD_FREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; _7zz.src.drvAttrs.outputHash" | tr -d '"')"
-echo "getting unfree source hash"
-OLD_UNFREE_HASH="$(nix-instantiate --eval --strict -E "with import $NIXPKGS_ROOT {}; (_7zz.override { enableUnfree = true; }).src.drvAttrs.outputHash" | tr -d '"')"
-
-NEW_VERSION_FORMATTED="$(echo "$NEW_VERSION" | tr -d '.')"
-URL="https://7-zip.org/a/7z${NEW_VERSION_FORMATTED}-src.tar.xz"
-
-# `nix-prefetch` is broken without flakes
-# see https://github.com/msteen/nix-prefetch/issues/51
-NEW_FREE_HASH=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "_7zz.src" --url "$URL" --option extra-experimental-features flakes)
-
-NEW_UNFREE_OUT=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "(_7zz.override { enableUnfree = true; }).src" --url "$URL" --output raw --print-path --option extra-experimental-features flakes)
-# first line of raw output is the hash
-NEW_UNFREE_HASH="$(echo "$NEW_UNFREE_OUT" | sed -n 1p)"
-# second line of raw output is the src path
-NEW_UNFREE_SRC="$(echo "$NEW_UNFREE_OUT" | sed -n 2p)"
-# make sure to nuke the unfree src from the updater's machine
-# > the license requires that you agree to these use restrictions, or you must remove the software (source and binary) from your hard disks
-# https://fedoraproject.org/wiki/Licensing:Unrar
-nix-store --delete "$NEW_UNFREE_SRC"
-
-
-echo "updating version"
-sed -i "s/version = \"$OLD_VERSION\";/version = \"$NEW_VERSION\";/" "$DRV_DIR/default.nix"
-
-echo "updating free hash"
-sed -i "s@free = \"$OLD_FREE_HASH\";@free = \"$NEW_FREE_HASH\";@" "$DRV_DIR/default.nix"
-echo "updating unfree hash"
-sed -i "s@unfree = \"$OLD_UNFREE_HASH\";@unfree = \"$NEW_UNFREE_HASH\";@" "$DRV_DIR/default.nix"
-
-echo "done"
+update-source-version _7zz "$NEW_VERSION"
+update-source-version _7zz-rar "$NEW_VERSION" --ignore-same-version
diff --git a/pkgs/tools/archivers/arc_unpacker/default.nix b/pkgs/tools/archivers/arc_unpacker/default.nix
index 61bf3fa91e741..057efacdbe765 100644
--- a/pkgs/tools/archivers/arc_unpacker/default.nix
+++ b/pkgs/tools/archivers/arc_unpacker/default.nix
@@ -85,7 +85,7 @@ stdenv.mkDerivation {
   doCheck = !(stdenv.isLinux && stdenv.isAarch64);
 
   meta = with lib; {
-    description = "A tool to extract files from visual novel archives";
+    description = "Tool to extract files from visual novel archives";
     homepage = "https://github.com/vn-tools/arc_unpacker";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ midchildan ];
diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix
index 5b65a580fa673..04c0300944eb4 100644
--- a/pkgs/tools/archivers/cpio/default.nix
+++ b/pkgs/tools/archivers/cpio/default.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://www.gnu.org/software/cpio/";
-    description = "A program to create or extract from cpio archives";
+    description = "Program to create or extract from cpio archives";
     license = licenses.gpl3;
     platforms = platforms.all;
     priority = 6; # resolves collision with gnutar's "libexec/rmt"
diff --git a/pkgs/tools/archivers/ctrtool/default.nix b/pkgs/tools/archivers/ctrtool/default.nix
index 74b95a116575e..aa9dffc12944b 100644
--- a/pkgs/tools/archivers/ctrtool/default.nix
+++ b/pkgs/tools/archivers/ctrtool/default.nix
@@ -1,29 +1,37 @@
-{ lib, stdenv, fetchFromGitHub }:
+{ lib, stdenv, fetchFromGitHub, gitUpdater }:
 
 stdenv.mkDerivation rec {
   pname = "ctrtool";
-  version = "0.7";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
     owner  = "jakcron";
     repo   = "Project_CTR";
     rev    = "ctrtool-v${version}";
-    sha256 = "07aayck82w5xcp3si35d7ghybmrbqw91fqqvmbpjrjcixc6m42z7";
+    sha256 = "wjU/DJHrAHE3MSB7vy+swUDVPzw0Jrv4ymOjhfr0BBk=";
   };
 
   sourceRoot = "${src.name}/ctrtool";
 
-  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++"];
   enableParallelBuilding = true;
 
+  preBuild = ''
+  make -j $NIX_BUILD_CORES deps
+  '';
+
+  # workaround for https://github.com/3DSGuy/Project_CTR/issues/145
+  env.NIX_CFLAGS_COMPILE = "-O0";
+
   installPhase = "
     mkdir $out/bin -p
-    cp ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
+    cp bin/ctrtool${stdenv.hostPlatform.extensions.executable} $out/bin/
   ";
 
+  passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; };
+
   meta = with lib; {
     license = licenses.mit;
-    description = "A tool to extract data from a 3ds rom";
+    description = "Tool to extract data from a 3ds rom";
     platforms = platforms.linux;
     maintainers = [ maintainers.marius851000 ];
     mainProgram = "ctrtool";
diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix
index 34615d7e8bede..98f0b54e73fc9 100644
--- a/pkgs/tools/archivers/gnutar/default.nix
+++ b/pkgs/tools/archivers/gnutar/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, autoreconfHook, acl, libintl }:
+{ lib, stdenv, fetchurl, autoreconfHook, updateAutotoolsGnuConfigScriptsHook, acl, libintl }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
 # cannot use fetchpatch! All mutable patches (generated by GitHub or
@@ -30,7 +30,8 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "info" ];
 
-  nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;
+  nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook
+    ++ lib.optional (!stdenv.isDarwin) updateAutotoolsGnuConfigScriptsHook;
   # Add libintl on Darwin specifically as it fails to link (or skip)
   # NLS on it's own:
   #  "_libintl_textdomain", referenced from:
diff --git a/pkgs/tools/archivers/innoextract/default.nix b/pkgs/tools/archivers/innoextract/default.nix
index 386c6349d0889..1219c48ab7d29 100644
--- a/pkgs/tools/archivers/innoextract/default.nix
+++ b/pkgs/tools/archivers/innoextract/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    description = "A tool to unpack installers created by Inno Setup";
+    description = "Tool to unpack installers created by Inno Setup";
     homepage = "https://constexpr.org/innoextract/";
     license = licenses.zlib;
     maintainers = with maintainers; [ abbradar ];
diff --git a/pkgs/tools/archivers/ndstool/default.nix b/pkgs/tools/archivers/ndstool/default.nix
index e612d83d066d1..6bbc5f50d6442 100644
--- a/pkgs/tools/archivers/ndstool/default.nix
+++ b/pkgs/tools/archivers/ndstool/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     homepage = "https://github.com/devkitPro/ndstool";
-    description = "A tool to unpack and repack nds rom";
+    description = "Tool to unpack and repack nds rom";
     maintainers = [ lib.maintainers.marius851000 ];
     license = lib.licenses.gpl3;
     mainProgram = "ndstool";
diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix
index 23ffdcc41a70c..3ced84bed025f 100644
--- a/pkgs/tools/archivers/p7zip/default.nix
+++ b/pkgs/tools/archivers/p7zip/default.nix
@@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     homepage = "https://github.com/p7zip-project/p7zip";
-    description = "A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)";
+    description = "New p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)";
     license = with licenses;
       # p7zip code is largely lgpl2Plus
       # CPP/7zip/Compress/LzfseDecoder.cpp is bsd3
diff --git a/pkgs/tools/archivers/payload-dumper-go/default.nix b/pkgs/tools/archivers/payload-dumper-go/default.nix
index bb1572e1ceb67..e10b41cbef995 100644
--- a/pkgs/tools/archivers/payload-dumper-go/default.nix
+++ b/pkgs/tools/archivers/payload-dumper-go/default.nix
@@ -20,7 +20,7 @@ buildGoModule rec {
   buildInputs = [ xz ];
 
   meta = with lib; {
-    description = "An android OTA payload dumper written in Go";
+    description = "Android OTA payload dumper written in Go";
     homepage = "https://github.com/ssut/payload-dumper-go";
     changelog = "https://github.com/ssut/payload-dumper-go/releases/tag/${version}";
     license = licenses.asl20;
diff --git a/pkgs/tools/archivers/runzip/default.nix b/pkgs/tools/archivers/runzip/default.nix
index 02b6bd45d8e1d..90eb6d1013876 100644
--- a/pkgs/tools/archivers/runzip/default.nix
+++ b/pkgs/tools/archivers/runzip/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   };
 
   meta = {
-    description = "A tool to convert filename encoding inside a ZIP archive";
+    description = "Tool to convert filename encoding inside a ZIP archive";
     license = lib.licenses.bsd2;
     maintainers = [ lib.maintainers.raskin ];
     platforms = lib.platforms.unix;
diff --git a/pkgs/tools/archivers/s-tar/default.nix b/pkgs/tools/archivers/s-tar/default.nix
index 89830322267c5..f16c9eaf49821 100644
--- a/pkgs/tools/archivers/s-tar/default.nix
+++ b/pkgs/tools/archivers/s-tar/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    description = "A very fast tar like tape archiver with improved functionality";
+    description = "Very fast tar like tape archiver with improved functionality";
     longDescription = ''
       Star archives and extracts multiple files to and from a single file called a tarfile.
       A tarfile is usually a magnetic tape, but it can be any file.
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index 5c84e596531c3..2a656a9dd3273 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchpatch, gettext, coreutils }:
+{ lib, stdenv, fetchurl, fetchpatch, gettext, coreutils, updateAutotoolsGnuConfigScriptsHook }:
 
 stdenv.mkDerivation rec {
   pname = "sharutils";
@@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
 
   # GNU Gettext is needed on non-GNU platforms.
   buildInputs = [ coreutils gettext ];
+  nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
 
   # These tests try to hit /etc/passwd to find out your username if pass in a submitter
   # name on the command line. Since we block access to /etc/passwd on the Darwin sandbox
diff --git a/pkgs/tools/archivers/snzip/default.nix b/pkgs/tools/archivers/snzip/default.nix
index 6ae59143f3e95..b6e671839ab03 100644
--- a/pkgs/tools/archivers/snzip/default.nix
+++ b/pkgs/tools/archivers/snzip/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   meta = with lib; {
-    description = "A compression/decompression tool based on snappy";
+    description = "Compression/decompression tool based on snappy";
     homepage = "https://github.com/kubo/snzip";
     maintainers = with maintainers; [ doronbehar ];
     license = licenses.bsd2;
diff --git a/pkgs/tools/archivers/torrent7z/default.nix b/pkgs/tools/archivers/torrent7z/default.nix
index 74eaa4409f75b..f18871baae93f 100644
--- a/pkgs/tools/archivers/torrent7z/default.nix
+++ b/pkgs/tools/archivers/torrent7z/default.nix
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://github.com/BubblesInTheTub/torrent7z";
-    description = "A fork of torrent7z, viz a derivative of 7zip that produces invariant .7z archives for torrenting";
+    description = "Fork of torrent7z, viz a derivative of 7zip that produces invariant .7z archives for torrenting";
     platforms = platforms.linux;
     maintainers = with maintainers; [ cirno-999 ];
     mainProgram = "t7z";
diff --git a/pkgs/tools/archivers/unar/default.nix b/pkgs/tools/archivers/unar/default.nix
index b874522d87f08..44a5d4d1192de 100644
--- a/pkgs/tools/archivers/unar/default.nix
+++ b/pkgs/tools/archivers/unar/default.nix
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://theunarchiver.com";
-    description = "An archive unpacker program";
+    description = "Archive unpacker program";
     longDescription = ''
       The Unarchiver is an archive unpacker program with support for the popular
       zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN,
diff --git a/pkgs/tools/archivers/unzip/default.nix b/pkgs/tools/archivers/unzip/default.nix
index 9860817cf3e15..ae9a129c766f6 100644
--- a/pkgs/tools/archivers/unzip/default.nix
+++ b/pkgs/tools/archivers/unzip/default.nix
@@ -99,9 +99,10 @@ stdenv.mkDerivation rec {
 
   meta = {
     homepage = "http://www.info-zip.org";
-    description = "An extraction utility for archives compressed in .zip format";
+    description = "Extraction utility for archives compressed in .zip format";
     license = lib.licenses.info-zip;
     platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ RossComputerGuy ];
     mainProgram = "unzip";
   };
 }
diff --git a/pkgs/tools/archivers/wimlib/default.nix b/pkgs/tools/archivers/wimlib/default.nix
index 6baf1ac89645e..8a40a6ae10774 100644
--- a/pkgs/tools/archivers/wimlib/default.nix
+++ b/pkgs/tools/archivers/wimlib/default.nix
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://wimlib.net";
-    description = "A library and program to extract, create, and modify WIM files";
+    description = "Library and program to extract, create, and modify WIM files";
     platforms = platforms.unix;
     maintainers = with maintainers; [ ];
     license = with licenses; [ gpl3 lgpl3 mit ];
diff --git a/pkgs/tools/archivers/xarchive/default.nix b/pkgs/tools/archivers/xarchive/default.nix
index 733639c3e1067..193e319cafdd6 100644
--- a/pkgs/tools/archivers/xarchive/default.nix
+++ b/pkgs/tools/archivers/xarchive/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   hardeningDisable = [ "format" ];
 
   meta = {
-    description = "A GTK front-end for command line archiving tools";
+    description = "GTK front-end for command line archiving tools";
     maintainers = [ lib.maintainers.domenkozar ];
     license = lib.licenses.gpl2Plus;
     platforms = lib.platforms.all;
diff --git a/pkgs/tools/archivers/zip/default.nix b/pkgs/tools/archivers/zip/default.nix
index 8a81691d64488..a192b38785049 100644
--- a/pkgs/tools/archivers/zip/default.nix
+++ b/pkgs/tools/archivers/zip/default.nix
@@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
     # Buffer overflow on Unicode characters in path names
     # https://bugzilla.redhat.com/show_bug.cgi?id=2165653
     ./buffer-overflow-on-utf8-rh-bug-2165653.patch
+    # Fixes forward declaration errors with timezone.c
+    ./fix-time.h-not-included.patch
   ] ++ lib.optionals (enableNLS && !stdenv.isCygwin) [ ./natspec-gentoo.patch.bz2 ];
 
   buildInputs = lib.optional enableNLS libnatspec
diff --git a/pkgs/tools/archivers/zip/fix-time.h-not-included.patch b/pkgs/tools/archivers/zip/fix-time.h-not-included.patch
new file mode 100644
index 0000000000000..9db8d66e9a10f
--- /dev/null
+++ b/pkgs/tools/archivers/zip/fix-time.h-not-included.patch
@@ -0,0 +1,10 @@
+--- zip30/timezone.c	2024-05-21 05:14:55.959957517 +0000
++++ zip30/timezone.c	2024-05-21 05:15:14.852006815 +0000
+@@ -41,6 +41,7 @@
+ #include "timezone.h"
+ #include <ctype.h>
+ #include <errno.h>
++#include <time.h>
+
+ #ifdef IZTZ_DEFINESTDGLOBALS
+ long timezone = 0;