From 2c430626afff03bec16071843f0e661a43cfe2c9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 15 Jul 2018 11:00:09 +0200 Subject: thimbleweed-park: Add desktop item The Ransome Unbeeped DLC doesn't have a data/noarch/support directory which we need for the icon so we need to change the unpack root to data/noarch. This shouldn't make the unpacking phase that much longer because the only additional files that get unpacked are small scripts and docs. Signed-off-by: aszlig --- pkgs/games/gog/thimbleweed-park.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'pkgs/games') diff --git a/pkgs/games/gog/thimbleweed-park.nix b/pkgs/games/gog/thimbleweed-park.nix index a37074cc..b9e14c32 100644 --- a/pkgs/games/gog/thimbleweed-park.nix +++ b/pkgs/games/gog/thimbleweed-park.nix @@ -17,7 +17,7 @@ buildGame rec { sha256 = "1cfll73qazm9nz40n963qvankqkznfjai9g88kgw6xcl40y8jrqn"; }); - unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :"; + unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/*' || :"; buildInputs = [ libGL ]; @@ -38,15 +38,29 @@ buildGame rec { } EOF patchelf --add-needed "$out/libexec/thimbleweed-park/preload.so" \ - ThimbleweedPark + game/ThimbleweedPark ''; installPhase = '' - install -vD ThimbleweedPark "$out/bin/thimbleweed-park" + install -vD game/ThimbleweedPark "$out/bin/thimbleweed-park" install -vD preload.so "$out/libexec/thimbleweed-park/preload.so" - for i in *.ggpack[0-9]*; do - install -vD -m 0644 "$i" "$out/share/thimbleweed-park/$i" + for i in game/*.ggpack[0-9]*; do + install -vD -m 0644 "$i" "$out/share/thimbleweed-park/$(basename "$i")" done + + install -vD -m 0644 support/icon.png \ + "$out/share/icons/thimbleweed-park.png" + + mkdir -p "$out/share/applications" + cat > "$out/share/applications/thimbleweed-park.desktop" <