From 718581f55b637d017d3f205660b56dd96ee2242c Mon Sep 17 00:00:00 2001 From: huantian Date: Wed, 2 Oct 2024 21:55:31 -0700 Subject: [PATCH 1/2] scarab: format with nixfmt --- pkgs/tools/games/scarab/default.nix | 49 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/games/scarab/default.nix b/pkgs/tools/games/scarab/default.nix index 25ac92691e89..e84a210f4083 100644 --- a/pkgs/tools/games/scarab/default.nix +++ b/pkgs/tools/games/scarab/default.nix @@ -1,13 +1,14 @@ -{ lib -, buildDotnetModule -, fetchFromGitHub -, glibc -, zlib -, gtk3 -, copyDesktopItems -, icoutils -, wrapGAppsHook3 -, makeDesktopItem +{ + lib, + buildDotnetModule, + fetchFromGitHub, + glibc, + zlib, + gtk3, + copyDesktopItems, + icoutils, + wrapGAppsHook3, + makeDesktopItem, }: buildDotnetModule rec { @@ -58,26 +59,28 @@ buildDotnetModule rec { done ''; - desktopItems = [(makeDesktopItem { - desktopName = "Scarab"; - name = "scarab"; - exec = "Scarab"; - icon = "scarab"; - comment = meta.description; - type = "Application"; - categories = [ "Game" ]; - })]; + desktopItems = [ + (makeDesktopItem { + desktopName = "Scarab"; + name = "scarab"; + exec = "Scarab"; + icon = "scarab"; + comment = meta.description; + type = "Application"; + categories = [ "Game" ]; + }) + ]; passthru.updateScript = ./update.sh; - meta = with lib; { + meta = { description = "Hollow Knight mod installer and manager"; homepage = "https://github.com/fifty-six/Scarab"; downloadPage = "https://github.com/fifty-six/Scarab/releases"; changelog = "https://github.com/fifty-six/Scarab/releases/tag/v${version}"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ huantian ]; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ huantian ]; mainProgram = "Scarab"; - platforms = platforms.linux; + platforms = lib.platforms.linux; }; } From 2edfaf4d64bfa00d7f1a8fe6b0d8994d920ea272 Mon Sep 17 00:00:00 2001 From: huantian Date: Wed, 2 Oct 2024 21:56:44 -0700 Subject: [PATCH 2/2] scarab: fix crash (#345038), don't bundle tests By using testProjectFile, we can properly build the test and run it in checkPhase, as well as not include the test in the derivation output. This also happens to fix the startup crash as described in #345038. --- pkgs/tools/games/scarab/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/games/scarab/default.nix b/pkgs/tools/games/scarab/default.nix index e84a210f4083..617f8f0e87b2 100644 --- a/pkgs/tools/games/scarab/default.nix +++ b/pkgs/tools/games/scarab/default.nix @@ -23,7 +23,8 @@ buildDotnetModule rec { }; nugetDeps = ./deps.nix; - projectFile = "Scarab.sln"; + projectFile = "Scarab/Scarab.csproj"; + testProjectFile = "Scarab.Tests/Scarab.Tests.csproj"; executables = [ "Scarab" ]; preConfigureNuGet = '' @@ -48,6 +49,8 @@ buildDotnetModule rec { wrapGAppsHook3 ]; + doCheck = true; + postFixup = '' # Icons for the desktop file icotool -x $src/Scarab/Assets/omegamaggotprime.ico