mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Merge pull request #83469 from veprbl/pr/mame_darwin_fix
mame: add darwin support
This commit is contained in:
commit
97530e119f
@ -1,14 +1,17 @@
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
|
||||
, python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
|
||||
, libpcap, CoreAudioKit, ForceFeedback
|
||||
, installShellFiles }:
|
||||
|
||||
with stdenv;
|
||||
|
||||
let
|
||||
majorVersion = "0";
|
||||
minorVersion = "219";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "MAME";
|
||||
exec = "mame${stdenv.lib.optionalString stdenv.is64bit "64"}";
|
||||
exec = "mame${lib.optionalString stdenv.is64bit "64"}";
|
||||
desktopName = "MAME";
|
||||
genericName = "MAME is a multi-purpose emulation framework";
|
||||
categories = "System;Emulator;";
|
||||
@ -27,13 +30,22 @@ in mkDerivation {
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
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 ];
|
||||
|
||||
# by default MAME assumes that paths with stock resources
|
||||
@ -58,16 +70,18 @@ in mkDerivation {
|
||||
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
|
||||
|
||||
mv artwork plugins samples ${dest}
|
||||
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $out/share
|
||||
ln -s ${desktopItem}/share/applications $out/share
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Is a multi-purpose emulation framework";
|
||||
homepage = https://www.mamedev.org/;
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
|
@ -25308,7 +25308,9 @@ in
|
||||
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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user