about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/rm/rmg
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/rm/rmg')
-rw-r--r--nixpkgs/pkgs/by-name/rm/rmg/package.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/by-name/rm/rmg/package.nix b/nixpkgs/pkgs/by-name/rm/rmg/package.nix
index 09a774b1f482..50436f36b928 100644
--- a/nixpkgs/pkgs/by-name/rm/rmg/package.nix
+++ b/nixpkgs/pkgs/by-name/rm/rmg/package.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , boost
 , cmake
 , discord-rpc
@@ -19,6 +20,8 @@
 , which
 , xdg-user-dirs
 , zlib
+# Affects final license
+, withAngrylionRdpPlus ? false
 }:
 
 let
@@ -26,15 +29,25 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "rmg";
-  version = "0.5.5";
+  version = "0.5.7";
 
   src = fetchFromGitHub {
     owner = "Rosalie241";
     repo = "RMG";
     rev = "v${version}";
-    hash = "sha256-au5GDyfW9+drkDNBWNbPY5Bgbow/hQmvP5pWJsYKbYs=";
+    hash = "sha256-j3OVhcTGUXPC0+AqvAJ7+mc+IFqJeBITU99pvfXIunQ=";
   };
 
+  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=";
+    })
+  ];
+
   nativeBuildInputs = [
     cmake
     nasm
@@ -66,6 +79,7 @@ stdenv.mkDerivation rec {
     # 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.isLinux [
@@ -79,7 +93,7 @@ stdenv.mkDerivation rec {
       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 = licenses.gpl3;
+    license = if withAngrylionRdpPlus then licenses.unfree else licenses.gpl3Only;
     platforms = platforms.linux;
     mainProgram = "RMG";
     maintainers = with maintainers; [ slam-bert ];