p7zip: add setup hook
This commit is contained in:
parent
f9281609ae
commit
0063c8acb4
pkgs/tools/archivers/p7zip
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://p7zip.sourceforge.net/;
|
homepage = http://p7zip.sourceforge.net/;
|
||||||
description = "A port of the 7-zip archiver";
|
description = "A port of the 7-zip archiver";
|
||||||
|
5
pkgs/tools/archivers/p7zip/setup-hook.sh
Normal file
5
pkgs/tools/archivers/p7zip/setup-hook.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
unpackCmdHooks+=(_try7zip)
|
||||||
|
_try7zip() {
|
||||||
|
if ! [[ "$curSrc" =~ \.7z$ ]]; then return 1; fi
|
||||||
|
7z x "$curSrc"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user