From 5d7371f8ac6e5fa021ff9f607be9b611598c69b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 26 Jan 2023 15:47:32 +0100 Subject: [PATCH] ddnet: pull upstream patch to fix darwin --- pkgs/games/ddnet/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/games/ddnet/default.nix b/pkgs/games/ddnet/default.nix index 3a70213bf889..1aaa752fbd6e 100644 --- a/pkgs/games/ddnet/default.nix +++ b/pkgs/games/ddnet/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake , ninja , pkg-config @@ -81,6 +82,15 @@ stdenv.mkDerivation rec { spirv-tools ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa OpenGL Security ]; + patches = [ + (fetchpatch { + # error: use of undeclared identifier 'pthread_attr_set_qos_class_np' + # https://github.com/ddnet/ddnet/pull/5913 + url = "https://github.com/ddnet/ddnet/pull/5913/commits/ccc6cd59de58905dce3a3bd5d8461a03b1adb249.patch"; + hash = "sha256-CkHckE+bOMKDcoijNYDo+zEQ9Eq9ePDV18LybzCMPYs="; + }) + ]; + postPatch = '' substituteInPlace src/engine/shared/storage.cpp \ --replace /usr/ $out/ @@ -106,8 +116,5 @@ stdenv.mkDerivation rec { license = licenses.asl20; maintainers = with maintainers; [ sirseruju lom ncfavier ]; mainProgram = "DDNet"; - # error: use of undeclared identifier 'pthread_attr_set_qos_class_np' - # https://github.com/ddnet/ddnet/pull/5913 - broken = stdenv.isDarwin; }; }