nixpkgs/pkgs/by-name/rm/rmg/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

103 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gitUpdater,
boost,
cmake,
discord-rpc,
freetype,
hidapi,
libpng,
libsamplerate,
minizip,
nasm,
pkg-config,
qt6Packages,
SDL2,
speexdsp,
vulkan-headers,
vulkan-loader,
which,
xdg-user-dirs,
zlib,
withWayland ? false,
# Affects final license
withAngrylionRdpPlus ? false,
}:
let
inherit (qt6Packages)
qtbase
qtsvg
qtwayland
wrapQtAppsHook
;
in
stdenv.mkDerivation rec {
pname = "rmg";
version = "0.6.6";
src = fetchFromGitHub {
owner = "Rosalie241";
repo = "RMG";
rev = "v${version}";
hash = "sha256-3Bl9SEHWQbi58VPpCT4H8TC1E5J5j4lRXS1QF+udPdg=";
};
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
] ++ lib.optional withWayland qtwayland;
cmakeFlags = [
"-DPORTABLE_INSTALL=OFF"
# mupen64plus-input-gca is written in Rust, so we can't build it with
# everything else.
"-DNO_RUST=ON"
"-DUSE_ANGRYLION=${lib.boolToString withAngrylionRdpPlus}"
];
qtWrapperArgs =
lib.optionals stdenv.hostPlatform.isLinux [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}"
]
++ lib.optional withWayland "--set RMG_WAYLAND 1";
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
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.
'';
license = if withAngrylionRdpPlus then licenses.unfree else licenses.gpl3Only;
platforms = platforms.linux;
mainProgram = "RMG";
maintainers = with maintainers; [ slam-bert ];
};
}