nixpkgs/pkgs/applications/emulators/mgba/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

100 lines
2.2 KiB
Nix
Raw Normal View History

2021-04-27 00:13:14 +00:00
{ lib
, SDL2
, cmake
, fetchFromGitHub
, ffmpeg
, discord-rpc
2021-04-27 00:13:14 +00:00
, libedit
, elfutils
, libepoxy
, libsForQt5
2021-04-27 00:13:14 +00:00
, libzip
2024-01-21 02:13:49 +00:00
, lua
2021-04-27 00:13:14 +00:00
, minizip
, pkg-config
, stdenv
2023-05-12 19:47:22 +00:00
, wrapGAppsHook
, enableDiscordRpc ? false
2021-04-27 00:13:14 +00:00
}:
let
inherit (libsForQt5)
qtbase
qtmultimedia
qttools
wrapQtAppsHook;
in
stdenv.mkDerivation (finalAttrs: {
pname = "mgba";
version = "0.10.3";
2016-10-08 20:41:03 +00:00
src = fetchFromGitHub {
owner = "mgba-emu";
repo = "mgba";
rev = finalAttrs.version;
hash = "sha256-wSt3kyjRxKBnDOVY10jq4cpv7uIaBUIcsZr6aU7XnMA=";
};
outputs = [ "out" "dev" "doc" "lib" "man" ];
2021-04-27 00:13:14 +00:00
nativeBuildInputs = [
SDL2
2021-04-27 00:13:14 +00:00
cmake
pkg-config
2023-05-12 19:47:22 +00:00
wrapGAppsHook
2021-04-27 00:13:14 +00:00
wrapQtAppsHook
];
2021-12-19 16:18:26 +00:00
2018-06-16 03:23:12 +00:00
buildInputs = [
2021-04-27 00:13:14 +00:00
SDL2
ffmpeg
2021-04-27 00:13:14 +00:00
libedit
elfutils
libepoxy
2021-04-27 00:13:14 +00:00
libzip
lua
2021-04-27 00:13:14 +00:00
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 = "A modern GBA emulator with a focus on accuracy";
2015-12-16 01:29:31 +00:00
longDescription = ''
mGBA is a new Game Boy Advance emulator written in C.
2021-04-27 00:13:14 +00:00
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.
2015-12-16 01:29:31 +00:00
'';
changelog = "https://raw.githubusercontent.com/mgba-emu/mgba/${finalAttrs.src.rev}/CHANGES";
license = with lib.licenses; [ mpl20 ];
mainProgram = "mgba";
maintainers = with lib.maintainers; [ MP2E AndersonTorres ];
platforms = lib.platforms.linux;
broken = enableDiscordRpc; # Some obscure `ld` error
};
})