unrar-free: add setupHook
This adds a setupHook to unrar-free which is parallel to the one in unrar. This enables the unpackPhase to automatically use unrar-free to unpack RAR files.
This commit is contained in:
committed by
George Macon
parent
668c45925f
commit
76f6b5efdf
@@ -21,6 +21,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
buildInputs = [ libarchive ];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
description = "Free utility to extract files from RAR archives";
|
||||
longDescription = ''
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
unpackCmdHooks+=(_tryUnrarFree)
|
||||
_tryUnrarFree() {
|
||||
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
|
||||
unrar-free -x "$curSrc" >/dev/null
|
||||
}
|
||||
Reference in New Issue
Block a user