Merge pull request #304942 from atorres1985-contrib/mednafen

Mednafen refactors
This commit is contained in:
Weijia Wang 2024-04-21 00:08:52 +02:00 committed by GitHub
commit 3d3bf4d32b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 122 additions and 99 deletions

View file

@ -1,22 +0,0 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mednafen-server";
version = "0.5.2";
src = fetchurl {
url = "https://mednafen.github.io/releases/files/mednafen-server-${version}.tar.xz";
sha256 = "0xm7dj5nwnrsv69r72rcnlw03jm0l8rmrg3s05gjfvxyqmlb36dq";
};
postInstall = "install -m 644 -Dt $out/share/mednafen-server standard.conf";
meta = with lib; {
description = "Netplay server for Mednafen";
mainProgram = "mednafen-server";
homepage = "https://mednafen.github.io/";
license = licenses.gpl2;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}

View file

@ -1,42 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, pkg-config
, mednafen
, gtk3
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "mednaffe";
version = "0.9.2";
src = fetchFromGitHub {
owner = "AmatCoder";
repo = "mednaffe";
rev = version;
sha256 = "sha256-zvSAt6CMcgdoPpTTA5sPlQaWUw9LUMsR2Xg9jM2UaWY=";
};
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 mednafen ];
enableParallelBuilding = true;
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH ':' "${mednafen}/bin"
)
'';
meta = with lib; {
description = "GTK-based frontend for mednafen emulator";
mainProgram = "mednaffe";
homepage = "https://github.com/AmatCoder/mednaffe";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sheenobu yana AndersonTorres ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mednafen-server";
version = "0.5.2";
src = fetchurl {
url = "https://mednafen.github.io/releases/files/mednafen-server-${finalAttrs.version}.tar.xz";
hash = "sha256-uJmxaMW+bydfAXq8XDOioMoBOLUsi5OT2Tpbbotsp3Y=";
};
strictDeps = true;
postInstall = ''
install -m 644 -Dt $out/share/mednafen-server standard.conf
'';
meta = {
description = "Netplay server for Mednafen";
mainProgram = "mednafen-server";
homepage = "https://mednafen.github.io/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})

View file

@ -1,33 +1,39 @@
{ lib
, stdenv
, fetchurl
, SDL2
, SDL2_net
, alsa-lib
, flac
, freeglut
, libGL
, libGLU
, libX11
, libcdio
, libjack2
, libsamplerate
, libsndfile
, pkg-config
, zlib
, libiconv
{
lib,
SDL2,
SDL2_net,
alsa-lib,
fetchurl,
flac,
freeglut,
libGL,
libGLU,
libX11,
libcdio,
libiconv,
libjack2,
libsamplerate,
libsndfile,
pkg-config,
stdenv,
zlib,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "mednafen";
version = "1.29.0";
src = fetchurl {
url = "https://mednafen.github.io/releases/files/${pname}-${version}.tar.xz";
url = "https://mednafen.github.io/releases/files/mednafen-${finalAttrs.version}.tar.xz";
hash = "sha256-2j+88Ch3+b4PAov6XRy1npU6QEm5D+fjk4ijOG2fNi4=";
};
nativeBuildInputs = [ pkg-config ];
outputs = [ "out" "doc" ];
nativeBuildInputs = [
SDL2
pkg-config
];
buildInputs = [
SDL2
@ -48,16 +54,21 @@ stdenv.mkDerivation rec {
libiconv
];
hardeningDisable = [ "pic" "format" ];
hardeningDisable = [
"format"
"pic"
];
enableParallelBuilding = true;
strictDeps = true;
postInstall = ''
mkdir -p $out/share/doc
mv Documentation $out/share/doc/mednafen
mkdir -p $doc/share/doc
mv Documentation $doc/share/doc/mednafen
'';
meta = with lib; {
meta = {
homepage = "https://mednafen.github.io/";
description = "A portable, CLI-driven, SDL+OpenGL-based, multi-system emulator";
longDescription = ''
@ -91,9 +102,9 @@ stdenv.mkDerivation rec {
- Sega Saturn (experimental, x86_64 only)
- Sony PlayStation
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
license = lib.licenses.gpl2Plus;
mainProgram = "mednafen";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
}
})

View file

@ -0,0 +1,52 @@
{
lib,
autoreconfHook,
fetchFromGitHub,
gtk3,
mednafen,
pkg-config,
stdenv,
wrapGAppsHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mednaffe";
version = "0.9.3";
src = fetchFromGitHub {
owner = "AmatCoder";
repo = "mednaffe";
rev = finalAttrs.version;
hash = "sha256-ZizW0EeY/Cc68m87cnbLAkx3G/ULyFT5b6Ku2ObzFRU=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
wrapGAppsHook
];
buildInputs = [
gtk3
mednafen
];
enableParallelBuilding = true;
strictDeps = true;
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH ':' "${mednafen}/bin"
)
'';
meta = {
description = "GTK-based frontend for mednafen emulator";
mainProgram = "mednaffe";
homepage = "https://github.com/AmatCoder/mednaffe";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})

View file

@ -2750,12 +2750,6 @@ with pkgs;
description = mame.meta.description + " (tools only)";
} (lib.getOutput "tools" mame);
mednafen = callPackage ../applications/emulators/mednafen { };
mednafen-server = callPackage ../applications/emulators/mednafen/server.nix { };
mednaffe = callPackage ../applications/emulators/mednaffe { };
melonDS = libsForQt5.callPackage ../applications/emulators/melonDS { };
mgba = libsForQt5.callPackage ../applications/emulators/mgba { };