steamworks: Various fixes

- Change updateScript to gitUpdater, nix-update-script was trying to downgrade to the last tag with a release page
- Add catch2 to checkInputs, was previously unused
- Fix catch2 linking
- Fix non-debug compilation
- Enable tests
- Add references to upstream-submitted fixes

OPNA2608 1d3cc906 976cc1a6

+48 -7
+26
pkgs/by-name/st/steamworks/1001-Add-missing-logger-methods.patch
··· 1 + From 5f144d5d26ea0dd1754ed25a583ebafa01ecbb4b Mon Sep 17 00:00:00 2001 2 + From: OPNA2608 <opna2608@protonmail.com> 3 + Date: Sun, 3 Aug 2025 20:06:49 +0200 4 + Subject: [PATCH] src/common/logger.h: Add missing methods under NDEBUG 5 + 6 + --- 7 + src/common/logger.h | 3 +++ 8 + 1 file changed, 3 insertions(+) 9 + 10 + diff --git a/src/common/logger.h b/src/common/logger.h 11 + index 0901205..259f058 100644 12 + --- a/src/common/logger.h 13 + +++ b/src/common/logger.h 14 + @@ -81,6 +81,9 @@ public: 15 + LoggerStream& getStream(int level) { return stream; } 16 + 17 + void debug(...) {} 18 + + void warn(...) {} 19 + + 20 + + bool isDebugEnabled() { return false; } 21 + }; 22 + 23 + // Bogus level numbers; I don't know if these are compatible with 24 + -- 25 + 2.50.1 26 +
+22 -7
pkgs/by-name/st/steamworks/package.nix
··· 11 11 log4cpp, 12 12 openldap, 13 13 sqlite, 14 - nix-update-script, 14 + gitUpdater, 15 15 }: 16 16 17 17 stdenv.mkDerivation (finalAttrs: { ··· 25 25 hash = "sha256-hD1nTyv/t7MQdopqivfSE0o4Qk1ymG8zQVg56lY+t9o="; 26 26 }; 27 27 28 - # src/common/logger.h:254:63: error: 'uint8_t' does not name a type 28 + patches = [ 29 + # https://gitlab.com/arpa2/steamworks/-/merge_requests/13 30 + ./1001-Add-missing-logger-methods.patch 31 + ]; 32 + 29 33 postPatch = '' 30 - sed -i "38i #include <cstdint>" src/common/logger.h 34 + # src/common/logger.h:254:63: error: 'uint8_t' does not name a type 35 + # https://gitlab.com/arpa2/steamworks/-/merge_requests/11 36 + sed -i "40i #include <cstdint>" src/common/logger.h 37 + 38 + # ld: cannot find -lLog4cpp: No such file or directory 39 + # https://gitlab.com/arpa2/steamworks/-/merge_requests/12 40 + substituteInPlace src/common/CMakeLists.txt \ 41 + --replace-fail 'Catch2::Catch2 Log4cpp' 'Catch2::Catch2 Log4cpp::Log4cpp' 31 42 ''; 32 43 33 44 strictDeps = true; ··· 47 58 sqlite 48 59 ]; 49 60 50 - # Currently doesn't build in `Release` since a macro is messing with some code 51 - # when building in `Release`. 52 - cmakeBuildType = "Debug"; 61 + checkInputs = [ 62 + catch2 63 + ]; 53 64 54 - passthru.updateScript = nix-update-script { }; 65 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 66 + 67 + passthru.updateScript = gitUpdater { 68 + rev-prefix = "v"; 69 + }; 55 70 56 71 meta = { 57 72 description = "Configuration information distributed over LDAP in near realtime";