mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
ddnet: 16.5 -> 16.7.2
Adds a build dependency on Rust. Also enable the tests and add me as maintainer.
This commit is contained in:
parent
838857d11a
commit
e722b101f4
@ -4,6 +4,7 @@
|
|||||||
, cmake
|
, cmake
|
||||||
, ninja
|
, ninja
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
, rustPlatform
|
||||||
, curl
|
, curl
|
||||||
, freetype
|
, freetype
|
||||||
, libGLU
|
, libGLU
|
||||||
@ -22,6 +23,7 @@
|
|||||||
, vulkan-loader
|
, vulkan-loader
|
||||||
, glslang
|
, glslang
|
||||||
, spirv-tools
|
, spirv-tools
|
||||||
|
, gtest
|
||||||
, Carbon
|
, Carbon
|
||||||
, Cocoa
|
, Cocoa
|
||||||
, OpenGL
|
, OpenGL
|
||||||
@ -30,16 +32,33 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ddnet";
|
pname = "ddnet";
|
||||||
version = "16.5";
|
version = "16.7.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ddnet";
|
owner = "ddnet";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
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 = [
|
buildInputs = [
|
||||||
curl
|
curl
|
||||||
@ -62,15 +81,18 @@ stdenv.mkDerivation rec {
|
|||||||
spirv-tools
|
spirv-tools
|
||||||
] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa OpenGL Security ];
|
] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa OpenGL Security ];
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DAUTOUPDATE=OFF"
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/engine/shared/storage.cpp \
|
substituteInPlace src/engine/shared/storage.cpp \
|
||||||
--replace /usr/ $out/
|
--replace /usr/ $out/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DAUTOUPDATE=OFF"
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
checkTarget = "run_tests";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Teeworlds modification with a unique cooperative gameplay.";
|
description = "A Teeworlds modification with a unique cooperative gameplay.";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -82,9 +104,10 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
homepage = "https://ddnet.org";
|
homepage = "https://ddnet.org";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ sirseruju lom ];
|
maintainers = with maintainers; [ sirseruju lom ncfavier ];
|
||||||
mainProgram = "DDNet";
|
mainProgram = "DDNet";
|
||||||
# error: use of undeclared identifier 'pthread_attr_set_qos_class_np'
|
# error: use of undeclared identifier 'pthread_attr_set_qos_class_np'
|
||||||
|
# https://github.com/ddnet/ddnet/pull/5913
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user