Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

mame: add darwin support

(cherry picked from commit 39921bd43ba6ccd273f4337098b71eb851e9c77d)

authored by

Dmitry Kalinkin and committed by
Daiderd Jordan
8876e5ed 06fe4b25

+24 -8
+21 -7
pkgs/misc/emulators/mame/default.nix
··· 1 { stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper 2 , python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama 3 , installShellFiles }: 4 5 let 6 majorVersion = "0"; ··· 8 9 desktopItem = makeDesktopItem { 10 name = "MAME"; 11 - exec = "mame${stdenv.lib.optionalString stdenv.is64bit "64"}"; 12 desktopName = "MAME"; 13 genericName = "MAME is a multi-purpose emulation framework"; 14 categories = "System;Emulator;"; ··· 27 }; 28 29 hardeningDisable = [ "fortify" ]; 30 - NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ]; 31 32 - makeFlags = [ "TOOLS=1" ]; 33 34 dontWrapQtApps = true; 35 36 - buildInputs = [ SDL2 SDL2_ttf alsaLib qtbase libXinerama ]; 37 nativeBuildInputs = [ python pkgconfig which makeWrapper installShellFiles ]; 38 39 # by default MAME assumes that paths with stock resources ··· 58 installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 59 60 mv artwork plugins samples ${dest} 61 - 62 mkdir -p $out/share 63 ln -s ${desktopItem}/share/applications $out/share 64 ''; 65 66 - meta = with stdenv.lib; { 67 description = "Is a multi-purpose emulation framework"; 68 homepage = https://www.mamedev.org/; 69 license = with licenses; [ bsd3 gpl2Plus ]; 70 - platforms = [ "x86_64-linux" "i686-linux" ]; 71 maintainers = with maintainers; [ gnidorah ]; 72 }; 73 }
··· 1 { stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper 2 , python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama 3 + , libpcap, CoreAudioKit, ForceFeedback 4 , installShellFiles }: 5 + 6 + with stdenv; 7 8 let 9 majorVersion = "0"; ··· 11 12 desktopItem = makeDesktopItem { 13 name = "MAME"; 14 + exec = "mame${lib.optionalString stdenv.is64bit "64"}"; 15 desktopName = "MAME"; 16 genericName = "MAME is a multi-purpose emulation framework"; 17 categories = "System;Emulator;"; ··· 30 }; 31 32 hardeningDisable = [ "fortify" ]; 33 + NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" "-Wno-error=missing-braces" ]; 34 35 + makeFlags = [ 36 + "TOOLS=1" 37 + "USE_LIBSDL=1" 38 + ] 39 + ++ lib.optionals stdenv.cc.isClang [ "CC=clang" "CXX=clang++" ] 40 + ; 41 42 dontWrapQtApps = true; 43 44 + buildInputs = 45 + [ SDL2 SDL2_ttf qtbase libXinerama ] 46 + ++ lib.optional stdenv.isLinux alsaLib 47 + ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ] 48 + ; 49 nativeBuildInputs = [ python pkgconfig which makeWrapper installShellFiles ]; 50 51 # by default MAME assumes that paths with stock resources ··· 70 installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 71 72 mv artwork plugins samples ${dest} 73 + '' + lib.optionalString stdenv.isLinux '' 74 mkdir -p $out/share 75 ln -s ${desktopItem}/share/applications $out/share 76 ''; 77 78 + meta = with lib; { 79 description = "Is a multi-purpose emulation framework"; 80 homepage = https://www.mamedev.org/; 81 license = with licenses; [ bsd3 gpl2Plus ]; 82 + platforms = platforms.unix; 83 + # makefile needs fixes for install target 84 + badPlatforms = [ "aarch64-linux" ]; 85 maintainers = with maintainers; [ gnidorah ]; 86 }; 87 }
+3 -1
pkgs/top-level/all-packages.nix
··· 24971 icu = icu58; 24972 }; 24973 24974 - mame = libsForQt5.callPackage ../misc/emulators/mame { }; 24975 24976 martyr = callPackage ../development/libraries/martyr { }; 24977
··· 24971 icu = icu58; 24972 }; 24973 24974 + mame = libsForQt5.callPackage ../misc/emulators/mame { 24975 + inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback; 24976 + }; 24977 24978 martyr = callPackage ../development/libraries/martyr { }; 24979