7zz: add setup hook script to unpack DMG files
This commit is contained in:
parent
856e73228c
commit
8bfc662c08
2 changed files with 7 additions and 0 deletions
|
@ -99,6 +99,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
nativeBuildInputs = lib.optionals useUasm [ uasm ];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preBuild = "cd CPP/7zip/Bundles/Alone2";
|
||||
|
|
5
pkgs/tools/archivers/7zz/setup-hook.sh
Normal file
5
pkgs/tools/archivers/7zz/setup-hook.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
unpackCmdHooks+=(_tryUnpackDmg)
|
||||
_tryUnpackDmg() {
|
||||
if ! [[ "$curSrc" =~ \.dmg$ ]]; then return 1; fi
|
||||
7zz x "$curSrc"
|
||||
}
|
Loading…
Reference in a new issue