Merge pull request #161422 from OPNA2608/darwinify/mednafen

mednafen,mednaffe: Enable for Darwin
This commit is contained in:
Anderson Torres 2022-02-24 09:26:51 -03:00 committed by GitHub
commit 205927a987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 10 deletions

View File

@ -15,6 +15,7 @@
, libsndfile
, pkg-config
, zlib
, libiconv
}:
stdenv.mkDerivation rec {
@ -31,20 +32,25 @@ stdenv.mkDerivation rec {
buildInputs = [
SDL2
SDL2_net
alsa-lib
flac
freeglut
libGL
libGLU
libX11
libcdio
libjack2
libsamplerate
libsndfile
zlib
] ++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libGL
libGLU
libX11
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
hardeningDisable = [ "pic" ];
hardeningDisable = [ "pic" "format" ];
enableParallelBuilding = true;
postInstall = ''
mkdir -p $out/share/doc
@ -87,6 +93,6 @@ stdenv.mkDerivation rec {
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -20,11 +20,15 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
buildInputs = [ gtk3 mednafen ];
postInstall = ''
wrapProgram $out/bin/mednaffe \
enableParallelBuilding = true;
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH ':' "${mednafen}/bin"
)
'';
meta = with lib; {
@ -32,6 +36,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/AmatCoder/mednaffe";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sheenobu yana AndersonTorres ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -7824,7 +7824,9 @@ with pkgs;
mdp = callPackage ../applications/misc/mdp { };
mednafen = callPackage ../applications/emulators/mednafen { };
mednafen = callPackage ../applications/emulators/mednafen {
inherit (darwin) libiconv;
};
mednafen-server = callPackage ../applications/emulators/mednafen/server.nix { };