From c7c6b372e94ef613d98e76f1226d3fc63b65d6fb Mon Sep 17 00:00:00 2001 From: liberodark Date: Sun, 19 Jan 2025 19:53:19 +0100 Subject: [PATCH] hawkthorne-journey: Fix Desktop --- .../by-name/ha/hawkthorne-journey/package.nix | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/ha/hawkthorne-journey/package.nix b/pkgs/by-name/ha/hawkthorne-journey/package.nix index e08ecd62b283..9d8ee57c9306 100644 --- a/pkgs/by-name/ha/hawkthorne-journey/package.nix +++ b/pkgs/by-name/ha/hawkthorne-journey/package.nix @@ -2,12 +2,12 @@ lib, stdenv, fetchFromGitHub, - buildGoModule, love, lua, zip, makeWrapper, makeDesktopItem, + copyDesktopItems, tmx2lua, }: @@ -25,6 +25,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ zip makeWrapper + copyDesktopItems ]; buildInputs = [ @@ -38,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { # Convert TMX maps to Lua for tmxfile in src/maps/*.tmx; do - ${tmx2lua}/bin/tmx2lua "$tmxfile" + tmx2lua "$tmxfile" done # Create the .love file @@ -67,23 +68,22 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ${love}/bin/love $out/bin/hawkthorne \ --add-flags "$out/share/games/hawkthorne/hawkthorne.love" - mkdir -p $out/share/applications - cp ${finalAttrs.desktopItem}/share/applications/* $out/share/applications/ - runHook postInstall ''; - desktopItem = makeDesktopItem { - name = "hawkthorne"; - exec = "hawkthorne"; - icon = "hawkthorne"; - desktopName = "Journey to the Center of Hawkthorne"; - genericName = "Platform Game"; - categories = [ - "Game" - "ArcadeGame" - ]; - }; + desktopItems = [ + (makeDesktopItem { + name = "hawkthorne"; + exec = "hawkthorne"; + icon = "hawkthorne"; + desktopName = "Journey to the Center of Hawkthorne"; + genericName = "Platform Game"; + categories = [ + "Game" + "ArcadeGame" + ]; + }) + ]; meta = { description = "Journey to the Center of Hawkthorne - Community Fan Game";