ddnet: pull upstream patch to fix darwin

This commit is contained in:
Naïm Favier 2023-01-26 15:47:32 +01:00
parent e722b101f4
commit 5d7371f8ac
No known key found for this signature in database
GPG key ID: 95AFCE8211908325

View file

@ -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;
};
}