7zz: add setup hook script to unpack DMG files

This commit is contained in:
Alexis Hildebrandt 2024-02-19 06:14:38 +01:00
parent 856e73228c
commit 8bfc662c08
2 changed files with 7 additions and 0 deletions

View file

@ -99,6 +99,8 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = lib.optionals useUasm [ uasm ];
setupHook = ./setup-hook.sh;
enableParallelBuilding = true;
preBuild = "cd CPP/7zip/Bundles/Alone2";

View file

@ -0,0 +1,5 @@
unpackCmdHooks+=(_tryUnpackDmg)
_tryUnpackDmg() {
if ! [[ "$curSrc" =~ \.dmg$ ]]; then return 1; fi
7zz x "$curSrc"
}