ddnet 18.1 -> 18.2 (plus one patch to workaround a libcurl problem)

https://ddnet.org/downloads/#18.2
https://github.com/ddnet/ddnet/compare/18.1...18.2
This commit is contained in:
Heinz Deinhart 2024-05-05 21:32:44 +02:00
parent 66ae2791db
commit d41922a016
2 changed files with 20 additions and 3 deletions

View File

@ -0,0 +1,13 @@
diff -ur ddnet-18.2/src/engine/shared/http.cpp ddnet-18.2-nixos-libcurl-workaround/src/engine/shared/http.cpp
--- ddnet-18.2/src/engine/shared/http.cpp 2024-04-30 20:27:51.000000000 +0200
+++ ddnet-18.2-nixos-libcurl-workaround/src/engine/shared/http.cpp 2024-05-05 21:17:33.792870233 +0200
@@ -146,7 +146,8 @@
curl_easy_setopt(pH, CURLOPT_URL, m_aUrl);
curl_easy_setopt(pH, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(pH, CURLOPT_USERAGENT, GAME_NAME " " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
- curl_easy_setopt(pH, CURLOPT_ACCEPT_ENCODING, ""); // Use any compression algorithm supported by libcurl.
+ // curl_easy_setopt(pH, CURLOPT_ACCEPT_ENCODING, ""); // Use any compression algorithm supported by libcurl.
+ curl_easy_setopt(pH, CURLOPT_ACCEPT_ENCODING, "gzip, deflate"); // NixOS libcurl workaround: don't use brotli
curl_easy_setopt(pH, CURLOPT_HEADERDATA, this);
curl_easy_setopt(pH, CURLOPT_HEADERFUNCTION, HeaderCallback);

View File

@ -35,21 +35,25 @@
stdenv.mkDerivation rec {
pname = "ddnet";
version = "18.1";
version = "18.2";
src = fetchFromGitHub {
owner = "ddnet";
repo = pname;
rev = version;
hash = "sha256-kAMKeYYMCFMgG3+G/05DwA3mj4JkJdrXadjFUMPDAbM=";
hash = "sha256-KerV174GPF2htfaQo5gRFLgpnGf9UoS0zQ/yd/SDFkQ=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${version}";
inherit src;
hash = "sha256-8mUo2I5FsA3ym/hrlGaUW8yltLuh/0H6wetCbzvRga0=";
hash = "sha256-cAz98SspJ5QFjw7rXtdmfShllAx89pg+PUs20bkmBCg=";
};
patches = [
./ddnet-18.2-nixos-libcurl-brotli-disable.patch
];
nativeBuildInputs = [
cmake
ninja