Merge pull request #212735 from ncfavier/ddnet

ddnet: 16.5 -> 16.7.2
This commit is contained in:
Weijia Wang 2023-01-27 10:38:11 +01:00 committed by GitHub
commit f4f592b17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,11 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, ninja
, pkg-config
, rustPlatform
, curl
, freetype
, libGLU
@ -22,6 +24,7 @@
, vulkan-loader
, glslang
, spirv-tools
, gtest
, Carbon
, Cocoa
, OpenGL
@ -30,16 +33,33 @@
stdenv.mkDerivation rec {
pname = "ddnet";
version = "16.5";
version = "16.7.2";
src = fetchFromGitHub {
owner = "ddnet";
repo = pname;
rev = version;
sha256 = "sha256-fHe72ew+qoSyOqXU9Hs9EyecrYDjEqTm+Ii9Zja9up4=";
hash = "sha256-dK46ubcq/sYSXLeZwAeomj9+jpSNpgHsTmXKdrllLTc=";
};
nativeBuildInputs = [ cmake ninja pkg-config ];
cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${version}";
inherit src;
hash = "sha256-jLR/XriiKXmpHGBHtPa1vpE5ms3Dw1wrNt/4KARyM74=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
rustPlatform.rust.rustc
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
];
nativeCheckInputs = [
gtest
];
buildInputs = [
curl
@ -62,8 +82,13 @@ stdenv.mkDerivation rec {
spirv-tools
] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa OpenGL Security ];
cmakeFlags = [
"-DAUTOUPDATE=OFF"
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 = ''
@ -71,6 +96,13 @@ stdenv.mkDerivation rec {
--replace /usr/ $out/
'';
cmakeFlags = [
"-DAUTOUPDATE=OFF"
];
doCheck = true;
checkTarget = "run_tests";
meta = with lib; {
description = "A Teeworlds modification with a unique cooperative gameplay.";
longDescription = ''
@ -82,9 +114,7 @@ stdenv.mkDerivation rec {
'';
homepage = "https://ddnet.org";
license = licenses.asl20;
maintainers = with maintainers; [ sirseruju lom ];
maintainers = with maintainers; [ sirseruju lom ncfavier ];
mainProgram = "DDNet";
# error: use of undeclared identifier 'pthread_attr_set_qos_class_np'
broken = stdenv.isDarwin;
};
}