2024-01-25 14:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-02-07 01:22:34 +00:00
|
|
|
, fetchpatch
|
2024-01-25 14:12:00 +00:00
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, discord-rpc
|
|
|
|
, freetype
|
|
|
|
, hidapi
|
|
|
|
, libpng
|
|
|
|
, libsamplerate
|
|
|
|
, minizip
|
|
|
|
, nasm
|
|
|
|
, pkg-config
|
|
|
|
, qt6Packages
|
|
|
|
, SDL2
|
|
|
|
, speexdsp
|
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, which
|
|
|
|
, xdg-user-dirs
|
|
|
|
, zlib
|
2024-02-07 01:22:34 +00:00
|
|
|
# Affects final license
|
|
|
|
, withAngrylionRdpPlus ? false
|
2024-01-25 14:12:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (qt6Packages) qtbase qtsvg wrapQtAppsHook;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rmg";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.5.7";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Rosalie241";
|
|
|
|
repo = "RMG";
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-j3OVhcTGUXPC0+AqvAJ7+mc+IFqJeBITU99pvfXIunQ=";
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
patches = [
|
|
|
|
# Fix bad concatenation of CMake GNUInstallDirs variables, causing broken asset lookup paths
|
|
|
|
# Remove when version > 0.5.7
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-rmg-Fix-GNUInstallDirs-usage.patch";
|
|
|
|
url = "https://github.com/Rosalie241/RMG/commit/685aa597c7ee7ad7cfd4dd782f40d21863b75899.patch";
|
|
|
|
hash = "sha256-HnaxUAX+3Z/VTtYYuhoXOtsDtV61nskgyzEcp8fdBsU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
nasm
|
|
|
|
pkg-config
|
|
|
|
wrapQtAppsHook
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
discord-rpc
|
|
|
|
freetype
|
|
|
|
hidapi
|
|
|
|
libpng
|
|
|
|
libsamplerate
|
|
|
|
minizip
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
SDL2
|
|
|
|
speexdsp
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
xdg-user-dirs
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPORTABLE_INSTALL=OFF"
|
|
|
|
# mupen64plus-input-gca is written in Rust, so we can't build it with
|
|
|
|
# everything else.
|
|
|
|
"-DNO_RUST=ON"
|
2024-02-07 01:22:34 +00:00
|
|
|
"-DUSE_ANGRYLION=${lib.boolToString withAngrylionRdpPlus}"
|
2024-01-25 14:12:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
qtWrapperArgs = lib.optionals stdenv.isLinux [
|
|
|
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Rosalie241/RMG";
|
|
|
|
description = "Rosalie's Mupen GUI";
|
|
|
|
longDescription = ''
|
|
|
|
Rosalie's Mupen GUI is a free and open-source mupen64plus front-end
|
|
|
|
written in C++. It offers a simple-to-use user interface.
|
|
|
|
'';
|
2024-02-07 01:22:34 +00:00
|
|
|
license = if withAngrylionRdpPlus then licenses.unfree else licenses.gpl3Only;
|
2024-01-25 14:12:00 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
mainProgram = "RMG";
|
|
|
|
maintainers = with maintainers; [ slam-bert ];
|
|
|
|
};
|
|
|
|
}
|