Merge pull request #257572 from wegank/unrar-bump

unrar: 6.2.5 -> 6.2.11

authored by Weijia Wang and committed by GitHub 05915e91 f3dab350

+34 -27
+30 -24
pkgs/tools/archivers/unrar/default.nix
··· 1 - {lib, stdenv, fetchurl}: 1 + { lib 2 + , stdenv 3 + , fetchzip 4 + }: 2 5 3 - stdenv.mkDerivation rec { 6 + stdenv.mkDerivation (finalAttrs: { 4 7 pname = "unrar"; 5 - version = "6.2.5"; 8 + version = "6.2.11"; 6 9 7 - src = fetchurl { 8 - url = "https://www.rarlab.com/rar/unrarsrc-${version}.tar.gz"; 9 - hash = "sha256-mjl0QQ0dNA45mN0qb5j6776DjK1VYmbnFK37Doz5N3w="; 10 + src = fetchzip { 11 + url = "https://www.rarlab.com/rar/unrarsrc-${finalAttrs.version}.tar.gz"; 12 + stripRoot = false; 13 + hash = "sha256-HFglLjn4UE8dalp2ZIFlqqaE9FahahFrDNsPrKUIQPI="; 10 14 }; 15 + 16 + sourceRoot = finalAttrs.src.name; 11 17 12 18 postPatch = '' 13 - substituteInPlace makefile \ 19 + substituteInPlace unrar/makefile \ 14 20 --replace "CXX=" "#CXX=" \ 15 21 --replace "STRIP=" "#STRIP=" \ 16 22 --replace "AR=" "#AR=" 17 23 ''; 18 24 25 + outputs = [ "out" "dev" ]; 26 + 27 + # `make {unrar,lib}` call `make clean` implicitly 28 + # separate build into different dirs to avoid deleting them 19 29 buildPhase = '' 20 - # `make {unrar,lib}` call `make clean` implicitly 21 - # move build results to another dir to avoid deleting them 22 - mkdir -p bin 30 + runHook preBuild 23 31 24 - make unrar 25 - mv unrar bin 32 + cp -a unrar libunrar 33 + make -C libunrar lib 34 + make -C unrar -j1 26 35 27 - make lib 28 - mv libunrar.so bin 36 + runHook postBuild 29 37 ''; 30 - 31 - outputs = [ "out" "dev" ]; 32 38 33 39 installPhase = '' 34 - install -Dt "$out/bin" bin/unrar 40 + runHook preInstall 35 41 36 - mkdir -p $out/share/doc/unrar 37 - cp acknow.txt license.txt \ 38 - $out/share/doc/unrar 42 + install -Dm755 unrar/unrar -t $out/bin/ 43 + install -Dm644 unrar/{acknow.txt,license.txt} -t $out/share/doc/unrar/ 39 44 40 - install -Dm755 bin/libunrar.so $out/lib/libunrar.so 45 + install -Dm755 libunrar/libunrar.so -t $out/lib/ 46 + install -Dm644 libunrar/dll.hpp -t $dev/include/unrar/ 41 47 42 - install -Dt $dev/include/unrar/ *.hpp 48 + runHook postInstall 43 49 ''; 44 50 45 51 setupHook = ./setup-hook.sh; ··· 48 54 description = "Utility for RAR archives"; 49 55 homepage = "https://www.rarlab.com/"; 50 56 license = licenses.unfreeRedistributable; 51 - maintainers = [ maintainers.ehmry ]; 57 + maintainers = with maintainers; [ ehmry wegank ]; 52 58 platforms = platforms.all; 53 59 }; 54 - } 60 + })
+4 -3
pkgs/tools/filesystems/rar2fs/default.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchFromGitHub 3 4 , autoreconfHook 4 5 , fuse ··· 25 26 buildInputs = [ fuse unrar ]; 26 27 27 28 configureFlags = [ 28 - "--with-unrar=${unrar.dev}/include/unrar" 29 + "--with-unrar=${unrar.src}/unrar" 29 30 "--disable-static-unrar" 30 31 ]; 31 32 ··· 33 34 description = "FUSE file system for reading RAR archives"; 34 35 homepage = "https://hasse69.github.io/rar2fs/"; 35 36 license = licenses.gpl3Plus; 36 - maintainers = with maintainers; [ kraem ]; 37 + maintainers = with maintainers; [ kraem wegank ]; 37 38 platforms = with platforms; linux ++ freebsd; 38 39 }; 39 40 }