anchor.diff:      install -D ./ryujinx-mime.xml $out/share/mime/packages/ryujinx-mime.xml
       install -D ./ryujinx-logo.svg $out/share/icons/hicolor/scalable/apps/ryujinx.svg
   
  -    substituteInPlace $out/share/applications/ryujinx.desktop --replace \
  -      "Exec=Ryujinx" "Exec=$out/bin/Ryujinx"
  +    substituteInPlace $out/share/applications/ryujinx.desktop \
  +      --replace "Exec=Ryujinx" "Exec=$out/bin/Ryujinx"
  +
  +    ln -s $out/bin/Ryujinx $out/bin/ryujinx
   
       popd
     '';
  
positive.code:     libXrandr
      fontconfig
      glew
    ];
  
    patches = [
      ./appdir.patch # Ryujinx attempts to write to the nix store. This patch redirects it to "~/.config/Ryujinx" on Linux.
    ];
  
    makeWrapperArgs = [
  
negative.code: , libXrandr
  , fontconfig
  , glew
  , libGL
  , SDL2
  , SDL2_mixer
  }:
  
  buildDotnetModule rec {
    pname = "ryujinx";
    version = "1.1.248"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
  
    src = fetchFromGitHub {
      owner = "Ryujinx";
      repo = "Ryujinx";
      rev = "5ff5fe47bad947a95545390865c597bec6c62070";
      sha256 = "0nfzf7q58mhdyszwv3mbz3wqf4w0m1p3fmf3cpga1pf9mfq65nqz";
    };
  
    nugetDeps = ./deps.nix;
  
    nativeBuildInputs = [
      wrapGAppsHook
  