mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-28 07:43:43 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
124 lines
2.7 KiB
Nix
124 lines
2.7 KiB
Nix
{
|
|
lib,
|
|
fetchzip,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
fetchpatch,
|
|
copyDesktopItems,
|
|
curl,
|
|
makeBinaryWrapper,
|
|
pkg-config,
|
|
which,
|
|
freetype,
|
|
libglvnd,
|
|
libjpeg,
|
|
libogg,
|
|
libvorbis,
|
|
libxmp,
|
|
openal,
|
|
SDL2,
|
|
speex,
|
|
makeDesktopItem,
|
|
nixosTests,
|
|
}:
|
|
|
|
let
|
|
openarena-maps = fetchzip {
|
|
name = "openarena-maps";
|
|
url = "https://download.tuxfamily.org/openarena/rel/088/openarena-0.8.8.zip";
|
|
hash = "sha256-Rup1n14k9sKcyVFYzFqPYV+BEBCnUNwpnFsnyGrhl20=";
|
|
};
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "openarena";
|
|
version = "unstable-2023-03-02";
|
|
|
|
src = fetchFromGitHub {
|
|
name = "openarena-source";
|
|
owner = "OpenArena";
|
|
repo = "engine";
|
|
rev = "075cb860a4d2bc43e75e5f506eba7da877708aba";
|
|
hash = "sha256-ofQKQyS3ti5TSN+zqwPFYuJiB9kvdER6zTWn8yrOpQU=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix Makefile `copyFiles` target
|
|
# Related upstream issue: https://github.com/OpenArena/engine/issues/83
|
|
(fetchpatch {
|
|
url = "https://github.com/OpenArena/engine/commit/f2b424bd332e90a1e2592edd21c62bdb8cd05214.patch";
|
|
hash = "sha256-legiXLtZAeG2t1esiBa37qkAgxPJVM7JLhjpxGUmWCo=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
copyDesktopItems
|
|
curl
|
|
makeBinaryWrapper
|
|
pkg-config
|
|
which
|
|
];
|
|
|
|
buildInputs = [
|
|
freetype
|
|
libglvnd
|
|
libjpeg
|
|
libogg
|
|
libvorbis
|
|
libxmp
|
|
openal
|
|
SDL2
|
|
speex
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
preConfigure = ''
|
|
cp ${./Makefile.local} ./Makefile.local
|
|
'';
|
|
|
|
installTargets = [ "copyfiles" ];
|
|
installFlags = [ "COPYDIR=$(out)/share/openarena" ];
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/share/openarena
|
|
'';
|
|
|
|
postInstall = ''
|
|
install -Dm644 misc/quake3.svg $out/share/icons/hicolor/scalable/apps/openarena.svg
|
|
|
|
makeWrapper $out/share/openarena/openarena.* $out/bin/openarena
|
|
makeWrapper $out/share/openarena/oa_ded.* $out/bin/oa_ded
|
|
|
|
ln -s ${openarena-maps}/baseoa $out/share/openarena/baseoa
|
|
ln -s ${openarena-maps}/missionpack $out/share/openarena/missionpack
|
|
'';
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "OpenArena";
|
|
exec = "openarena";
|
|
icon = "openarena";
|
|
comment = "A fast-paced 3D first-person shooter, similar to id Software Inc.'s Quake III Arena";
|
|
desktopName = "OpenArena";
|
|
categories = [
|
|
"Game"
|
|
"ActionGame"
|
|
];
|
|
})
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests) openarena; };
|
|
|
|
meta = {
|
|
description = "Fast-paced 3D first-person shooter, similar to id Software Inc.'s Quake III Arena";
|
|
homepage = "http://openarena.ws/";
|
|
license = lib.licenses.gpl2Plus;
|
|
mainProgram = "openarena";
|
|
maintainers = with lib.maintainers; [
|
|
drupol
|
|
wyvie
|
|
];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|