Support unraring source files
This commit is contained in:
@@ -23,6 +23,8 @@ stdenv.mkDerivation {
|
||||
$out/share/doc/unrar
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Utility for RAR archives";
|
||||
homepage = http://www.rarlab.com/;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
unpackCmdHooks+=(_tryUnrar)
|
||||
_tryUnrar() {
|
||||
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
|
||||
unrar x "$curSrc" >/dev/null
|
||||
}
|
||||
Reference in New Issue
Block a user