mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
taterclient-ddnet: init at 8.6.0 (#346206)
This commit is contained in:
commit
dd7960270b
|
@ -13729,6 +13729,12 @@
|
|||
githubId = 1215331;
|
||||
name = "Matt Melling";
|
||||
};
|
||||
melon = {
|
||||
email = "melontime05@gmail.com";
|
||||
github = "BlaiZephyr";
|
||||
githubId = 101197249;
|
||||
name = "Tim";
|
||||
};
|
||||
melsigl = {
|
||||
email = "melanie.bianca.sigl@gmail.com";
|
||||
github = "melsigl";
|
||||
|
|
136
pkgs/by-name/ta/taterclient-ddnet/package.nix
Normal file
136
pkgs/by-name/ta/taterclient-ddnet/package.nix
Normal file
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cargo,
|
||||
cmake,
|
||||
ninja,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
rustc,
|
||||
curl,
|
||||
freetype,
|
||||
libGLU,
|
||||
libnotify,
|
||||
libogg,
|
||||
libX11,
|
||||
opusfile,
|
||||
pcre,
|
||||
python3,
|
||||
SDL2,
|
||||
sqlite,
|
||||
wavpack,
|
||||
ffmpeg,
|
||||
x264,
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
glslang,
|
||||
spirv-tools,
|
||||
gtest,
|
||||
darwin,
|
||||
}:
|
||||
let
|
||||
clientExecutable = "TaterClient-DDNet";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "taterclient-ddnet";
|
||||
version = "8.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjrc6";
|
||||
repo = "taterclient-ddnet";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-IfTQRMC2wcEH+KhlADHVIhfavlTN4mfTtlN5+/KojA0=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit (finalAttrs) pname src version;
|
||||
hash = "sha256-L6NsLC5hg4/MlTfnOITBNoPIoKxlDx5BwXWnV7W4uT0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
rustc
|
||||
cargo
|
||||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ gtest ];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
curl
|
||||
libnotify
|
||||
pcre
|
||||
python3
|
||||
sqlite
|
||||
freetype
|
||||
libGLU
|
||||
libogg
|
||||
opusfile
|
||||
SDL2
|
||||
wavpack
|
||||
ffmpeg
|
||||
x264
|
||||
vulkan-loader
|
||||
vulkan-headers
|
||||
glslang
|
||||
spirv-tools
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||
with darwin.apple_sdk.frameworks;
|
||||
[
|
||||
Carbon
|
||||
Cocoa
|
||||
OpenGL
|
||||
Security
|
||||
]
|
||||
);
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/engine/shared/storage.cpp \
|
||||
--replace-fail /usr/ $out/
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DAUTOUPDATE=OFF"
|
||||
"-DCLIENT=ON"
|
||||
"-DSERVER=OFF"
|
||||
"-DTOOLS=OFF"
|
||||
"-DCLIENT_EXECUTABLE=${clientExecutable}"
|
||||
];
|
||||
|
||||
# Tests loop forever on Darwin for some reason
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
checkTarget = "run_tests";
|
||||
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Upstream links against <prefix>/lib while it installs this library in <prefix>/lib/ddnet
|
||||
install_name_tool -change "$out/lib/libsteam_api.dylib" "$out/lib/ddnet/libsteam_api.dylib" "$out/bin/${clientExecutable}"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Desktop application conflicts with the ddnet package
|
||||
mv "$out/share/applications/ddnet.desktop" "$out/share/applications/taterclient-ddnet.desktop"
|
||||
|
||||
substituteInPlace $out/share/applications/taterclient-ddnet.desktop \
|
||||
--replace-fail "Exec=DDNet" "Exec=${clientExecutable}" \
|
||||
--replace-fail "Name=DDNet" "Name=TaterClient (DDNet)" \
|
||||
--replace-fail "Comment=Launch DDNet" "Comment=Launch ${clientExecutable}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Modification of DDNet teeworlds client";
|
||||
homepage = "https://github.com/sjrc6/taterclient-ddnet";
|
||||
changelog = "https://github.com/sjrc6/taterclient-ddnet/releases";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
melon
|
||||
theobori
|
||||
];
|
||||
mainProgram = clientExecutable;
|
||||
};
|
||||
})
|
|
@ -122,6 +122,11 @@ stdenv.mkDerivation rec {
|
|||
rm -rf $out/share/metainfo
|
||||
'';
|
||||
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Upstream links against <prefix>/lib while it installs this library in <prefix>/lib/ddnet
|
||||
install_name_tool -change "$out/lib/libsteam_api.dylib" "$out/lib/ddnet/libsteam_api.dylib" "$out/bin/DDNet"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Teeworlds modification with a unique cooperative gameplay";
|
||||
longDescription = ''
|
||||
|
|
Loading…
Reference in a new issue