anchor.diff:      "-DUSE_SYSTEM_LIBZIP=ON"
       "-DUSE_SYSTEM_SNAPPY=ON"
       "-DUSING_QT_UI=ON"
  +    "-DHEADLESS=OFF"
     ];
   
     installPhase = ''
  
positive.code: 
  mkDerivation rec {
    pname = "ppsspp";
    version = "1.9.4";
  
    src = fetchFromGitHub {
      owner = "hrydgard";
      repo = "ppsspp";
      rev = "v${version}";
      fetchSubmodules = true;
      sha256 = "0ivi0dcfxwa4nz19amki80qacnjhqr42f0ihyby1scxafl3nq55c";
    };
  
    postPatch = ''
      substituteInPlace git-version.cmake \
        --replace unknown ${src.rev}
      substituteInPlace UI/NativeApp.cpp \
        --replace /usr/share $out/share
    '';
  
    nativeBuildInputs = [ cmake pkgconfig python3 ];
  
negative.code:   '';
  
    meta = with lib; {
      description = "A HLE Playstation Portable emulator, written in C++";
      homepage = "https://www.ppsspp.org/";
      license = licenses.gpl2Plus;
      maintainers = with maintainers; [ AndersonTorres ];
      platforms = platforms.linux;
    };
  }
  # TODO: add SDL headless port
  