Commit 4d643055 authored by Anderson Torres's avatar Anderson Torres
Browse files

mgba: refactor

- split outputs
- strictDeps
- get rid of nested with
- meta.changelog
parent b9019a84
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, SDL2
, cmake
, fetchFromGitHub
, ffmpeg
, libedit
, libelf
, libepoxy
, libsForQt5
, libzip
, lua5_4
, minizip
, pkg-config
, libsForQt5
, stdenv
, wrapGAppsHook
}:

@@ -34,18 +34,16 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-+AwIYhnqp984Banwb7zmB5yzenExfLLU1oGJSxeTl/M=";
  };

  outputs = [ "out" "dev" "doc" "lib" "man" ];

  nativeBuildInputs = [
    SDL2
    cmake
    pkg-config
    wrapGAppsHook
    wrapQtAppsHook
  ];

  dontWrapGApps = true;
  preFixup = ''
    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  buildInputs = [
    SDL2
    ffmpeg
@@ -60,7 +58,15 @@ stdenv.mkDerivation (finalAttrs: {
    qttools
  ];

  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 +83,10 @@ 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;
  };
})