anchor.diff:  , stdenv
   , alsa-lib
   , CoreAudioKit
  +, expat
   , fetchFromGitHub
  +, flac
   , fontconfig
   , ForceFeedback
  +, glm
   , installShellFiles
  +, libjpeg
   , libpcap
   , libpulseaudio
   , libXi
   , libXinerama
  +, lua5
   , makeDesktopItem
   , makeWrapper
   , pkg-config
  +, portaudio
  +, portmidi
  +, pugixml
   , python3
   , qtbase
  +, rapidjson
   , SDL2
   , SDL2_ttf
  +, utf8proc
   , which
   , writeScript
  +, zlib
   }:
   
   let
  
positive.code:   };
  
    hardeningDisable = [ "fortify" ];
    NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" "-Wno-error=missing-braces" ];
  
    makeFlags = [
      "TOOLS=1"
      "USE_LIBSDL=1"
      "CC=${stdenv.cc.targetPrefix}cc"
      "CXX=${stdenv.cc.targetPrefix}c++"
    ];
  
    dontWrapQtApps = true;
  
    # https://docs.mamedev.org/initialsetup/compilingmame.html
    buildInputs =
      [ SDL2 SDL2_ttf qtbase ]
      ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio libXinerama libXi fontconfig ]
      ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ];
  
    nativeBuildInputs = [ python3 pkg-config which makeWrapper installShellFiles ];
  
  
negative.code:     license = with licenses; [ bsd3 gpl2Plus ];
      platforms = platforms.unix;
      maintainers = with maintainers; [ thiagokokada ];
    };
  }
  