12 buildDotnetModule rec {
14 version = "2.0.0-unstable-2024-12-25";
16 src = fetchFromGitHub {
19 rev = "6820db37933002089a04d356d8469481e915a359";
20 hash = "sha256-TzGMZr351XvVj/wARWJxRisRb5JlkyzdjCVYbwydBVE=";
24 # the nightly avalonia repository url is still queried, which errors out
25 # even if we don't actually need any nightly versions
26 ./dont-use-alternative-restore-sources.patch
27 # upstream has a weird library loading mechanism, which we override with a more sane alternative
28 ./dont-zip-libraries.patch
31 dotnet-sdk = dotnetCorePackages.sdk_8_0;
32 dotnet-runtime = dotnetCorePackages.runtime_8_0;
34 projectFile = [ "UI/UI.csproj" ];
37 "-p:RuntimeIdentifier=${dotnetCorePackages.systemToDotnetRid clangStdenv.hostPlatform.system}"
40 executables = [ "Mesen" ];
42 nugetDeps = ./deps.json;
44 nativeBuildInputs = [ wrapGAppsHook3 ];
46 runtimeDeps = [ gtk3 ];
49 ln -s ${passthru.core}/lib/MesenCore.* $out/lib/mesen
52 # according to upstream, compiling with clang creates a faster binary
53 passthru.core = clangStdenv.mkDerivation {
57 enableParallelBuilding = true;
61 nativeBuildInputs = [ SDL2 ];
63 buildInputs = [ SDL2 ];
65 makeFlags = [ "core" ];
69 install -Dm755 InteropDLL/obj.*/MesenCore.* -t $out/lib
75 badPlatforms = [ "aarch64-linux" ]; # not sure what the issue is
76 description = "Multi-system emulator that supports NES, SNES, Game Boy (Color) and PC Engine games";
77 homepage = "https://www.mesen.ca";
78 license = lib.licenses.gpl3Plus;
79 mainProgram = "Mesen";
80 maintainers = with lib.maintainers; [ tomasajt ];