diff --git a/pkgs/by-name/ta/taterclient-ddnet/client_log_format_security.patch b/pkgs/by-name/ta/taterclient-ddnet/client_log_format_security.patch new file mode 100644 index 000000000000..9d0c56170162 --- /dev/null +++ b/pkgs/by-name/ta/taterclient-ddnet/client_log_format_security.patch @@ -0,0 +1,13 @@ +diff --git a/src/engine/client/client.cpp.orig b/src/engine/client/client.cpp +index ab70b3c..9e25353 100644 +--- a/src/engine/client/client.cpp.orig ++++ b/src/engine/client/client.cpp +@@ -4933,7 +4933,7 @@ int main(int argc, const char **argv) + { + char aError[2048]; + snprintf(aError, sizeof(aError), "Failed to load config from '%s'.", s_aConfigDomains[ConfigDomain].m_aConfigPath); +- log_error("client", aError); ++ log_error("client", "%s", aError); + pClient->ShowMessageBox("Config File Error", aError); + PerformAllCleanup(); + return -1; diff --git a/pkgs/by-name/ta/taterclient-ddnet/package.nix b/pkgs/by-name/ta/taterclient-ddnet/package.nix index 836ddc58a945..76a01e1b4b62 100644 --- a/pkgs/by-name/ta/taterclient-ddnet/package.nix +++ b/pkgs/by-name/ta/taterclient-ddnet/package.nix @@ -26,7 +26,6 @@ vulkan-loader, glslang, spirv-tools, - gtest, glew, }: let @@ -34,13 +33,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "taterclient-ddnet"; - version = "10.1.2"; + version = "10.3.0"; src = fetchFromGitHub { owner = "sjrc6"; repo = "taterclient-ddnet"; tag = "V${finalAttrs.version}"; - hash = "sha256-0N4nzGcmHrWkIFHEREtSBCTHPBE4UI8RmCuRsehX1YU="; + hash = "sha256-OEoiUtD87xsXBgAZ65mmfmAJcEvrley3drRX+IJo20s="; }; cargoDeps = rustPlatform.fetchCargoVendor { @@ -59,9 +58,6 @@ stdenv.mkDerivation (finalAttrs: { python3 ]; - nativeCheckInputs = [ gtest ]; - checkInputs = [ gtest ]; - buildInputs = [ curl libnotify @@ -84,6 +80,10 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; + patches = [ + ./client_log_format_security.patch + ]; + postPatch = '' substituteInPlace src/engine/shared/storage.cpp \ --replace-fail /usr/ $out/ @@ -98,10 +98,11 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CLIENT_EXECUTABLE" clientExecutable) ]; - doCheck = true; - checkTarget = "run_tests"; - - __darwinAllowLocalNetworking = true; # for tests + # Since we are not building the server executable, the `run_tests` Makefile target + # will not be generated. + # + # See https://github.com/sjrc6/TaterClient-ddnet/blob/V10.3.0/CMakeLists.txt#L3072 + doCheck = false; preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' # Upstream links against /lib while it installs this library in /lib/ddnet