depot/pkgs/by-name/mg/mgba/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

100 lines
2.2 KiB
Nix

{
lib,
SDL2,
cmake,
fetchFromGitHub,
ffmpeg,
discord-rpc,
libedit,
elfutils,
libepoxy,
libsForQt5,
libzip,
lua,
minizip,
pkg-config,
stdenv,
wrapGAppsHook3,
enableDiscordRpc ? false,
}:
let
inherit (libsForQt5)
qtbase
qtmultimedia
qttools
wrapQtAppsHook;
in
stdenv.mkDerivation (finalAttrs: {
pname = "mgba";
version = "0.10.3";
src = fetchFromGitHub {
owner = "mgba-emu";
repo = "mgba";
rev = finalAttrs.version;
hash = "sha256-wSt3kyjRxKBnDOVY10jq4cpv7uIaBUIcsZr6aU7XnMA=";
};
outputs = [ "out" "dev" "doc" "lib" "man" ];
nativeBuildInputs = [
SDL2
cmake
pkg-config
wrapGAppsHook3
wrapQtAppsHook
];
buildInputs = [
SDL2
ffmpeg
libedit
elfutils
libepoxy
libzip
lua
minizip
qtbase
qtmultimedia
qttools
]
++ lib.optionals enableDiscordRpc [ discord-rpc ];
cmakeFlags = [
(lib.cmakeBool "USE_DISCORD_RPC" enableDiscordRpc)
];
strictDeps = true;
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = {
homepage = "https://mgba.io";
description = "Modern GBA emulator with a focus on accuracy";
longDescription = ''
mGBA is a new Game Boy Advance emulator written in C.
The project started in April 2013 with the goal of being fast enough to
run on lower end hardware than other emulators support, without
sacrificing accuracy or portability. Even in the initial version, games
generally play without problems. It is loosely based on the previous
GBA.js emulator, although very little of GBA.js can still be seen in mGBA.
Other goals include accurate enough emulation to provide a development
environment for homebrew software, a good workflow for tool-assist
runners, and a modern feature set for emulators that older emulators may
not support.
'';
changelog = "https://raw.githubusercontent.com/mgba-emu/mgba/${finalAttrs.src.rev}/CHANGES";
license = with lib.licenses; [ mpl20 ];
mainProgram = "mgba";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
broken = enableDiscordRpc; # Some obscure `ld` error
};
})