Unverified Commit 367b5a68 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #282463 from atorres1985-contrib/mgba

mgba: 0.10.2 -> 0.10.3
parents b370f6a3 9838c39d
Loading
Loading
Loading
Loading
+30 −17
Original line number Diff line number Diff line
{ 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
  };
})