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
This commit is contained in:
parent
976cc1a6ad
commit
1d3cc9064e
@ -0,0 +1,26 @@
|
||||
From 5f144d5d26ea0dd1754ed25a583ebafa01ecbb4b Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Sun, 3 Aug 2025 20:06:49 +0200
|
||||
Subject: [PATCH] src/common/logger.h: Add missing methods under NDEBUG
|
||||
|
||||
---
|
||||
src/common/logger.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/common/logger.h b/src/common/logger.h
|
||||
index 0901205..259f058 100644
|
||||
--- a/src/common/logger.h
|
||||
+++ b/src/common/logger.h
|
||||
@@ -81,6 +81,9 @@ public:
|
||||
LoggerStream& getStream(int level) { return stream; }
|
||||
|
||||
void debug(...) {}
|
||||
+ void warn(...) {}
|
||||
+
|
||||
+ bool isDebugEnabled() { return false; }
|
||||
};
|
||||
|
||||
// Bogus level numbers; I don't know if these are compatible with
|
||||
--
|
||||
2.50.1
|
||||
|
@ -11,7 +11,7 @@
|
||||
log4cpp,
|
||||
openldap,
|
||||
sqlite,
|
||||
nix-update-script,
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@ -25,9 +25,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-hD1nTyv/t7MQdopqivfSE0o4Qk1ymG8zQVg56lY+t9o=";
|
||||
};
|
||||
|
||||
# src/common/logger.h:254:63: error: 'uint8_t' does not name a type
|
||||
patches = [
|
||||
# https://gitlab.com/arpa2/steamworks/-/merge_requests/13
|
||||
./1001-Add-missing-logger-methods.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "38i #include <cstdint>" src/common/logger.h
|
||||
# src/common/logger.h:254:63: error: 'uint8_t' does not name a type
|
||||
# https://gitlab.com/arpa2/steamworks/-/merge_requests/11
|
||||
sed -i "40i #include <cstdint>" src/common/logger.h
|
||||
|
||||
# ld: cannot find -lLog4cpp: No such file or directory
|
||||
# https://gitlab.com/arpa2/steamworks/-/merge_requests/12
|
||||
substituteInPlace src/common/CMakeLists.txt \
|
||||
--replace-fail 'Catch2::Catch2 Log4cpp' 'Catch2::Catch2 Log4cpp::Log4cpp'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
@ -47,11 +58,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sqlite
|
||||
];
|
||||
|
||||
# Currently doesn't build in `Release` since a macro is messing with some code
|
||||
# when building in `Release`.
|
||||
cmakeBuildType = "Debug";
|
||||
checkInputs = [
|
||||
catch2
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Configuration information distributed over LDAP in near realtime";
|
||||
|
Loading…
x
Reference in New Issue
Block a user