unrar-free: add setupHook (#344723)

This commit is contained in:
Thiago Kenji Okada
2025-01-17 09:24:07 +00:00
committed by GitHub
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -25,6 +25,8 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ libarchive ];
setupHook = ./setup-hook.sh;
meta = {
description = "Free utility to extract files from RAR archives";
longDescription = ''
+5
View File
@@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnrarFree)
_tryUnrarFree() {
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
unrar-free -x "$curSrc" >/dev/null
}