mame: add darwin support
This commit is contained in:
parent
db4bbfff66
commit
39921bd43b
@ -1,14 +1,17 @@
|
|||||||
{ stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
|
{ stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
|
||||||
, python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
|
, python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
|
||||||
|
, libpcap, CoreAudioKit, ForceFeedback
|
||||||
, installShellFiles }:
|
, installShellFiles }:
|
||||||
|
|
||||||
|
with stdenv;
|
||||||
|
|
||||||
let
|
let
|
||||||
majorVersion = "0";
|
majorVersion = "0";
|
||||||
minorVersion = "219";
|
minorVersion = "219";
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "MAME";
|
name = "MAME";
|
||||||
exec = "mame${stdenv.lib.optionalString stdenv.is64bit "64"}";
|
exec = "mame${lib.optionalString stdenv.is64bit "64"}";
|
||||||
desktopName = "MAME";
|
desktopName = "MAME";
|
||||||
genericName = "MAME is a multi-purpose emulation framework";
|
genericName = "MAME is a multi-purpose emulation framework";
|
||||||
categories = "System;Emulator;";
|
categories = "System;Emulator;";
|
||||||
@ -27,13 +30,22 @@ in mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "fortify" ];
|
hardeningDisable = [ "fortify" ];
|
||||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" "-Wno-error=missing-braces" ];
|
||||||
|
|
||||||
makeFlags = [ "TOOLS=1" ];
|
makeFlags = [
|
||||||
|
"TOOLS=1"
|
||||||
|
"USE_LIBSDL=1"
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.cc.isClang [ "CC=clang" "CXX=clang++" ]
|
||||||
|
;
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
buildInputs = [ SDL2 SDL2_ttf alsaLib qtbase libXinerama ];
|
buildInputs =
|
||||||
|
[ SDL2 SDL2_ttf qtbase libXinerama ]
|
||||||
|
++ lib.optional stdenv.isLinux alsaLib
|
||||||
|
++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ]
|
||||||
|
;
|
||||||
nativeBuildInputs = [ python pkgconfig which makeWrapper installShellFiles ];
|
nativeBuildInputs = [ python pkgconfig which makeWrapper installShellFiles ];
|
||||||
|
|
||||||
# by default MAME assumes that paths with stock resources
|
# by default MAME assumes that paths with stock resources
|
||||||
@ -58,16 +70,18 @@ in mkDerivation {
|
|||||||
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
|
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
|
||||||
|
|
||||||
mv artwork plugins samples ${dest}
|
mv artwork plugins samples ${dest}
|
||||||
|
'' + lib.optionalString stdenv.isLinux ''
|
||||||
mkdir -p $out/share
|
mkdir -p $out/share
|
||||||
ln -s ${desktopItem}/share/applications $out/share
|
ln -s ${desktopItem}/share/applications $out/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Is a multi-purpose emulation framework";
|
description = "Is a multi-purpose emulation framework";
|
||||||
homepage = https://www.mamedev.org/;
|
homepage = https://www.mamedev.org/;
|
||||||
license = with licenses; [ bsd3 gpl2Plus ];
|
license = with licenses; [ bsd3 gpl2Plus ];
|
||||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
platforms = platforms.unix;
|
||||||
|
# makefile needs fixes for install target
|
||||||
|
badPlatforms = [ "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ gnidorah ];
|
maintainers = with maintainers; [ gnidorah ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -25517,7 +25517,9 @@ in
|
|||||||
icu = icu58;
|
icu = icu58;
|
||||||
};
|
};
|
||||||
|
|
||||||
mame = libsForQt5.callPackage ../misc/emulators/mame { };
|
mame = libsForQt5.callPackage ../misc/emulators/mame {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback;
|
||||||
|
};
|
||||||
|
|
||||||
martyr = callPackage ../development/libraries/martyr { };
|
martyr = callPackage ../development/libraries/martyr { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user