Support unraring source files

This commit is contained in:
William A. Kennington III
2015-03-27 15:36:26 -07:00
parent 8fbc082d1f
commit 4631afc21e
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -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/;
+5
View File
@@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnrar)
_tryUnrar() {
if ! [[ "$curSrc" =~ \.rar$ ]]; then return 1; fi
unrar x "$curSrc" >/dev/null
}