diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/emulators/mgba/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/emulators/mgba/default.nix | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/applications/emulators/mgba/default.nix b/nixpkgs/pkgs/applications/emulators/mgba/default.nix index a52ee7ca30ce..4e0e8687b61e 100644 --- a/nixpkgs/pkgs/applications/emulators/mgba/default.nix +++ b/nixpkgs/pkgs/applications/emulators/mgba/default.nix @@ -1,22 +1,23 @@ { lib -, stdenv -, fetchFromGitHub , SDL2 , cmake +, fetchFromGitHub , ffmpeg +, discord-rpc , libedit , libelf , libepoxy +, libsForQt5 , libzip -, lua5_4 +, lua , minizip , pkg-config -, libsForQt5 +, stdenv , wrapGAppsHook +, enableDiscordRpc ? false }: let - lua = lua5_4; inherit (libsForQt5) qtbase qtmultimedia @@ -25,27 +26,25 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "mgba"; - version = "0.10.2"; + version = "0.10.3"; src = fetchFromGitHub { owner = "mgba-emu"; repo = "mgba"; rev = finalAttrs.version; - hash = "sha256-+AwIYhnqp984Banwb7zmB5yzenExfLLU1oGJSxeTl/M="; + hash = "sha256-wSt3kyjRxKBnDOVY10jq4cpv7uIaBUIcsZr6aU7XnMA="; }; + outputs = [ "out" "dev" "doc" "lib" "man" ]; + nativeBuildInputs = [ + SDL2 cmake pkg-config wrapGAppsHook wrapQtAppsHook ]; - dontWrapGApps = true; - preFixup = '' - qtWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - buildInputs = [ SDL2 ffmpeg @@ -58,9 +57,22 @@ stdenv.mkDerivation (finalAttrs: { qtbase qtmultimedia qttools + ] + ++ lib.optionals enableDiscordRpc [ discord-rpc ]; + + cmakeFlags = [ + (lib.cmakeBool "USE_DISCORD_RPC" enableDiscordRpc) ]; - meta = with lib; { + strictDeps = true; + + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + meta = { homepage = "https://mgba.io"; description = "A modern GBA emulator with a focus on accuracy"; longDescription = '' @@ -77,10 +89,11 @@ stdenv.mkDerivation (finalAttrs: { runners, and a modern feature set for emulators that older emulators may not support. ''; - changelog = "https://github.com/mgba-emu/mgba/blob/${finalAttrs.version}/CHANGES"; - license = licenses.mpl20; - maintainers = with maintainers; [ MP2E AndersonTorres ]; - platforms = platforms.linux; + 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 }; }) |