11 downloadVersion = lib.replaceStrings [ "." ] [ "" ] version;
12 # Use `./update.sh` to generate the entries below
15 url = "https://www.rarlab.com/rar/rarlinux-x32-${downloadVersion}.tar.gz";
16 hash = "sha256-1CSbxM7arGpn4Yj5fHEFKcDURFPrC2+XptLoaDH8LDs=";
19 url = "https://www.rarlab.com/rar/rarlinux-x64-${downloadVersion}.tar.gz";
20 hash = "sha256-34iWajylsSmIOuAT6kV7c2537qWFHc+gT+JT/trWrw8=";
23 url = "https://www.rarlab.com/rar/rarmacos-arm-${downloadVersion}.tar.gz";
24 hash = "sha256-BjEJFzKyRpN4XL6KYW7ykQcSxqF4tYr2dCFf50JHH38=";
27 url = "https://www.rarlab.com/rar/rarmacos-x64-${downloadVersion}.tar.gz";
28 hash = "sha256-1ExnVDre49wWwB/BKP/L9xdYOMx8qkeZfmObJ7xm4dY=";
32 url = "https://aur.archlinux.org/cgit/aur.git/plain/rar.1?h=rar&id=8e39a12e88d8a3b168c496c44c18d443c876dd10";
34 hash = "sha256-93cSr9oAsi+xHUtMsUvICyHJe66vAImS2tLie7nt8Uw=";
42 srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}")
47 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib stdenv.cc.cc) ];
51 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
56 install -Dm755 {rar,unrar} -t "$out/bin"
57 install -Dm755 default.sfx -t "$out/lib"
58 install -Dm644 {acknow.txt,license.txt} -t "$out/share/doc/rar"
59 install -Dm644 rarfiles.lst -t "$out/etc"
65 installManPage ${manSrc}
68 passthru.updateScript = ./update.sh;
71 description = "Utility for RAR archives";
72 homepage = "https://www.rarlab.com/";
73 license = licenses.unfree;
75 maintainers = with maintainers; [ thiagokokada ];
76 platforms = lib.attrNames srcs;
77 sourceProvenance = with sourceTypes; [ binaryNativeCode ];