summary refs log tree commit diff
path: root/pkgs/tools/archivers
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:48 +0100
commit048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch)
treef8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/archivers
parent030c5028b07afcedce7c5956015c629486cc79d9 (diff)
parent4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff)
downloadnixpkgs-rootfs.tar
nixpkgs-rootfs.tar.gz
nixpkgs-rootfs.tar.bz2
nixpkgs-rootfs.tar.lz
nixpkgs-rootfs.tar.xz
nixpkgs-rootfs.tar.zst
nixpkgs-rootfs.zip
Rebase onto e4ad989506ec7d71f7302cc3067abd82730a4beb HEAD rootfs
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r--[-rwxr-xr-x]pkgs/tools/archivers/payload-dumper-go/default.nix0
-rw-r--r--pkgs/tools/archivers/peazip/default.nix4
-rw-r--r--pkgs/tools/archivers/tarlz/default.nix7
-rw-r--r--pkgs/tools/archivers/unar/default.nix12
-rw-r--r--pkgs/tools/archivers/unrar/default.nix55
5 files changed, 44 insertions, 34 deletions
diff --git a/pkgs/tools/archivers/payload-dumper-go/default.nix b/pkgs/tools/archivers/payload-dumper-go/default.nix
index bb1572e1ceb..bb1572e1ceb 100755..100644
--- a/pkgs/tools/archivers/payload-dumper-go/default.nix
+++ b/pkgs/tools/archivers/payload-dumper-go/default.nix
diff --git a/pkgs/tools/archivers/peazip/default.nix b/pkgs/tools/archivers/peazip/default.nix
index 3dd74e1e729..b00f7b9d665 100644
--- a/pkgs/tools/archivers/peazip/default.nix
+++ b/pkgs/tools/archivers/peazip/default.nix
@@ -16,13 +16,13 @@
 
 stdenv.mkDerivation rec {
   pname = "peazip";
-  version = "9.9.0";
+  version = "9.4.0";
 
   src = fetchFromGitHub {
     owner = "peazip";
     repo = pname;
     rev = version;
-    hash = "sha256-1UavigwVp/Gna2BOUECQrn/VQjov8wDw5EdPWX3mpvM=";
+    hash = "sha256-to5VhuTomw33WRWrtSIMF/SD+KVXsUKmSrJ84BNatqw=";
   };
   sourceRoot = "${src.name}/peazip-sources";
 
diff --git a/pkgs/tools/archivers/tarlz/default.nix b/pkgs/tools/archivers/tarlz/default.nix
index 7f41a05a9a8..250b0e05c6c 100644
--- a/pkgs/tools/archivers/tarlz/default.nix
+++ b/pkgs/tools/archivers/tarlz/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "tarlz";
-  version = "0.22";
+  version = "0.24";
   outputs = [ "out" "man" "info" ];
 
   nativeBuildInputs = [ lzip texinfo ];
@@ -10,12 +10,13 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://savannah/lzip/${pname}/${pname}-${version}.tar.lz";
-    sha256 = "sha256-/M9yJvoktV0ybKsT926jSb7ERsWo33GkbTQwmaBQkdw=";
+    sha256 = "49838effe95acb29d548b7ef2ddbb4b63face40536df0d9a80a62900c7170576";
   };
 
   enableParallelBuilding = true;
   makeFlags = [ "CXX:=$(CXX)" ];
-  doCheck = !stdenv.isDarwin;
+
+  doCheck = false; # system clock issues
 
   meta = with lib; {
     homepage = "https://www.nongnu.org/lzip/${pname}.html";
diff --git a/pkgs/tools/archivers/unar/default.nix b/pkgs/tools/archivers/unar/default.nix
index ee1693ee18e..07aa89fa5ca 100644
--- a/pkgs/tools/archivers/unar/default.nix
+++ b/pkgs/tools/archivers/unar/default.nix
@@ -50,15 +50,17 @@ stdenv.mkDerivation rec {
     lib.optionals stdenv.isLinux [ gnustep.make ] ++
     lib.optionals stdenv.isDarwin [ xcbuildHook ];
 
+  # Work around https://github.com/NixOS/nixpkgs/issues/166205.
+  # xcbuild links with clang instead of clang++.
+  env = lib.optionalAttrs stdenv.isDarwin {
+    LD_FLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
+  };
+
   xcbuildFlags = lib.optionals stdenv.isDarwin [
     "-target unar"
     "-target lsar"
     "-configuration Release"
-    "MACOSX_DEPLOYMENT_TARGET=10.12"
-    # Fix "ld: file not found: /nix/store/*-clang-7.1.0/lib/arc/libarclite_macosx." error
-    # Disabling ARC may leak memory, however since this program is generally not used for
-    # long periods of time, it shouldn't be an issue
-    "CLANG_LINK_OBJC_RUNTIME=NO"
+    "MACOSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
   ];
 
   makefile = lib.optionalString (!stdenv.isDarwin) "Makefile.linux";
diff --git a/pkgs/tools/archivers/unrar/default.nix b/pkgs/tools/archivers/unrar/default.nix
index 74f1bcfe9b8..9350a6fd1ee 100644
--- a/pkgs/tools/archivers/unrar/default.nix
+++ b/pkgs/tools/archivers/unrar/default.nix
@@ -1,45 +1,51 @@
-{lib, stdenv, fetchurl}:
+{ lib
+, stdenv
+, fetchzip
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "unrar";
-  version = "6.2.5";
+  version = "6.2.12";
 
-  src = fetchurl {
-    url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz";
-    hash = "sha256-mjl0QQ0dNA45mN0qb5j6776DjK1VYmbnFK37Doz5N3w=";
+  src = fetchzip {
+    url = "https://www.rarlab.com/rar/unrarsrc-${finalAttrs.version}.tar.gz";
+    stripRoot = false;
+    hash = "sha256-VAL3o9JGmkAcEssa/P/SL9nyxnigb7dX9YZBHrG9f0A=";
   };
 
+  sourceRoot = finalAttrs.src.name;
+
   postPatch = ''
-    substituteInPlace makefile \
+    substituteInPlace unrar/makefile \
       --replace "CXX=" "#CXX=" \
       --replace "STRIP=" "#STRIP=" \
       --replace "AR=" "#AR="
   '';
 
+  outputs = [ "out" "dev" ];
+
+  # `make {unrar,lib}` call `make clean` implicitly
+  # separate build into different dirs to avoid deleting them
   buildPhase = ''
-    # `make {unrar,lib}` call `make clean` implicitly
-    # move build results to another dir to avoid deleting them
-    mkdir -p bin
+    runHook preBuild
 
-    make unrar
-    mv unrar bin
+    cp -a unrar libunrar
+    make -C libunrar lib
+    make -C unrar -j1
 
-    make lib
-    mv libunrar.so bin
+    runHook postBuild
   '';
 
-  outputs = [ "out" "dev" ];
-
   installPhase = ''
-    install -Dt "$out/bin" bin/unrar
+    runHook preInstall
 
-    mkdir -p $out/share/doc/unrar
-    cp acknow.txt license.txt \
-        $out/share/doc/unrar
+    install -Dm755 unrar/unrar -t $out/bin/
+    install -Dm644 unrar/{acknow.txt,license.txt} -t $out/share/doc/unrar/
 
-    install -Dm755 bin/libunrar.so $out/lib/libunrar.so
+    install -Dm755 libunrar/libunrar.so -t $out/lib/
+    install -Dm644 libunrar/dll.hpp -t $dev/include/unrar/
 
-    install -Dt $dev/include/unrar/ *.hpp
+    runHook postInstall
   '';
 
   setupHook = ./setup-hook.sh;
@@ -48,7 +54,8 @@ stdenv.mkDerivation rec {
     description = "Utility for RAR archives";
     homepage = "https://www.rarlab.com/";
     license = licenses.unfreeRedistributable;
-    maintainers = [ maintainers.ehmry ];
+    mainProgram = "unrar";
+    maintainers = with maintainers; [ ehmry wegank ];
     platforms = platforms.all;
   };
-}
+})