nixpkgs/pkgs/games/openrw/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
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-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

80 lines
1.6 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
sfml,
libGLU,
libGL,
bullet,
glm,
libmad,
openal,
SDL2,
boost,
ffmpeg_6,
Cocoa,
OpenAL,
}:
stdenv.mkDerivation {
version = "0-unstable-2024-04-20";
pname = "openrw";
src = fetchFromGitHub {
owner = "rwengine";
repo = "openrw";
rev = "f10a5a8f7abc79a0728847e9a10ee104a1216047";
hash = "sha256-4ydwPh/pCzuZNNOyZuEEeX4wzI+dqTtAxUyXOXz76zk=";
fetchSubmodules = true;
};
patches = [
# SoundSource.cpp: return AVERROR_EOF when buffer is empty
# https://github.com/rwengine/openrw/pull/747
./fix-ffmpeg-6.patch
];
postPatch = lib.optional (stdenv.cc.isClang && (lib.versionAtLeast stdenv.cc.version "9")) ''
substituteInPlace cmake_configure.cmake \
--replace 'target_link_libraries(rw_interface INTERFACE "stdc++fs")' ""
'';
nativeBuildInputs = [
cmake
ninja
];
buildInputs =
[
sfml
libGLU
libGL
bullet
glm
libmad
openal
SDL2
boost
ffmpeg_6
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
OpenAL
Cocoa
];
meta = with lib; {
description = "Unofficial open source recreation of the classic Grand Theft Auto III game executable";
homepage = "https://github.com/rwengine/openrw";
license = licenses.gpl3;
longDescription = ''
OpenRW is an open source re-implementation of Rockstar Games' Grand Theft
Auto III, a classic 3D action game first published in 2001.
'';
maintainers = with maintainers; [ kragniz ];
platforms = platforms.all;
mainProgram = "rwgame";
};
}