diff --git a/pkgs/build-support/setup-hooks/gog-unpack.sh b/pkgs/build-support/setup-hooks/gog-unpack.sh new file mode 100644 index 000000000000..559b543fadfc --- /dev/null +++ b/pkgs/build-support/setup-hooks/gog-unpack.sh @@ -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 +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 934c7388bccb..74969c98b4df 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };