build-support gogUnpackHook: support for unpacking games from gog.com

This commit is contained in:
Peter Hoeg 2018-02-04 21:31:39 +08:00
parent 646abe9b29
commit 126cc690ac
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,11 @@
unpackPhase="unpackGog"
unpackGog() {
runHook preUnpackGog
innoextract --silent --extract --exclude-temp "${src}"
find . -depth -print -execdir rename -f 'y/A-Z/a-z/' '{}' \;
runHook postUnpackGog
}

View file

@ -92,6 +92,11 @@ with pkgs;
{ substitutions = { gnu_config = gnu-config;}; }
../build-support/setup-hooks/update-autotools-gnu-config-scripts.sh;
gogUnpackHook = makeSetupHook {
name = "gog-unpack-hook";
deps = [ innoextract file-rename ]; }
../build-support/setup-hooks/gog-unpack.sh;
buildEnv = callPackage ../build-support/buildenv { }; # not actually a package
buildFHSUserEnv = callPackage ../build-support/build-fhs-userenv { };