From bcecded9ec6f9e93149fe6c9f9d6199d89739ea9 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Thu, 23 Nov 2023 15:20:12 +1100 Subject: [PATCH] sgdboop: init at 1.3.1 --- .../sg/sgdboop/hide_desktop_entry.patch | 22 +++++++ pkgs/by-name/sg/sgdboop/package.nix | 60 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 pkgs/by-name/sg/sgdboop/hide_desktop_entry.patch create mode 100644 pkgs/by-name/sg/sgdboop/package.nix diff --git a/pkgs/by-name/sg/sgdboop/hide_desktop_entry.patch b/pkgs/by-name/sg/sgdboop/hide_desktop_entry.patch new file mode 100644 index 000000000000..422c82fc4f29 --- /dev/null +++ b/pkgs/by-name/sg/sgdboop/hide_desktop_entry.patch @@ -0,0 +1,22 @@ +From a4ca664abfac0b7efa7dbc48c6438bc1a5333962 Mon Sep 17 00:00:00 2001 +From: Fazzi +Date: Sat, 24 May 2025 20:55:50 +0100 +Subject: [PATCH] desktopFile: hide entry from app launchers + +--- + linux-release/com.steamgriddb.SGDBoop.desktop | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linux-release/com.steamgriddb.SGDBoop.desktop b/linux-release/com.steamgriddb.SGDBoop.desktop +index 9c84cdb..9899682 100644 +--- a/linux-release/com.steamgriddb.SGDBoop.desktop ++++ b/linux-release/com.steamgriddb.SGDBoop.desktop +@@ -4,7 +4,7 @@ Comment=Apply Steam assets from SteamGridDB + Exec=SGDBoop %U + Terminal=false + Type=Application +-NoDisplay=false ++NoDisplay=true + Icon=com.steamgriddb.SGDBoop + MimeType=x-scheme-handler/sgdb + Categories=Utility diff --git a/pkgs/by-name/sg/sgdboop/package.nix b/pkgs/by-name/sg/sgdboop/package.nix new file mode 100644 index 000000000000..6ec7d9a1c03c --- /dev/null +++ b/pkgs/by-name/sg/sgdboop/package.nix @@ -0,0 +1,60 @@ +{ + lib, + stdenv, + fetchFromGitHub, + curl, + pkg-config, + wrapGAppsHook3, +}: +stdenv.mkDerivation rec { + pname = "sgdboop"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "SteamGridDB"; + repo = "SGDBoop"; + tag = "v${version}"; + hash = "sha256-FpVQQo2N/qV+cFhYZ1FVm+xlPHSVMH4L+irnQEMlUQs="; + }; + + patches = [ + # Hide the app from app launchers, as it is not meant to be run directly + # Remove when https://github.com/SteamGridDB/SGDBoop/pull/112 is merged + ./hide_desktop_entry.patch + ]; + + makeFlags = [ + # The flatpak install just copies things to /app - otherwise wants to do things with XDG + "FLATPAK_ID=fake" + ]; + + postPatch = '' + substituteInPlace Makefile \ + --replace-fail "/app/" "$out/" + ''; + + postInstall = '' + rm -r "$out/share/metainfo" + ''; + + nativeBuildInputs = [ + pkg-config + wrapGAppsHook3 + ]; + + buildInputs = [ + curl + ]; + + meta = { + description = "Applying custom artwork to Steam, using SteamGridDB"; + homepage = "https://github.com/SteamGridDB/SGDBoop/"; + license = lib.licenses.zlib; + maintainers = with lib.maintainers; [ + saturn745 + fazzi + ]; + mainProgram = "SGDBoop"; + platforms = lib.platforms.linux; + }; +}