Change:
}) ]; <del> installPhase = let vulkanPath = lib.makeLibraryPath [ vulkan-loader ]; in '' runHook preInstall </del> <ins> installPhase = lib.concatStringsSep "n" ([ ''runHook preInstall'' ] ++ [ ''mkdir -p $out/share/{applications,ppsspp/bin,icons}'' ] ++ (if enableQt then [ ''install -Dm555 PPSSPPQt $out/share/ppsspp/bin/'' ] else [ ''install -Dm555 PPSSPPHeadless $out/share/ppsspp/bin/'' ''makeWrapper $out/share/ppsspp/bin/PPSSPPHeadless $out/bin/ppsspp-headless'' ''install -Dm555 PPSSPPSDL $out/share/ppsspp/bin/'' ]) ++ [ ''mv assets $out/share/ppsspp'' ''mv ../icons/hicolor $out/share/icons'' ] ++ [ ''runHook postInstall'' ]); </ins> <del> mkdir -p $out/share/{applications,ppsspp,icons} '' + (if enableQt then '' install -Dm555 PPSSPPQt $out/bin/ppsspp wrapProgram $out/bin/ppsspp  '' else '' install -Dm555 PPSSPPHeadless $out/bin/ppsspp-headless install -Dm555 PPSSPPSDL $out/share/ppsspp/ makeWrapper $out/share/ppsspp/PPSSPPSDL $out/bin/ppsspp  --set SDL_VIDEODRIVER ${if forceWayland then "wayland" else "x11"}  '') + lib.optionalString enableVulkan '' --prefix LD_LIBRARY_PATH : ${vulkanPath}  '' + '' mv assets $out/share/ppsspp mv ../icons/hicolor $out/share/icons runHook postInstall ''; </del> <ins> postFixup = let wrapperArgs = lib.concatStringsSep " " (lib.optionals enableVulkan [ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}" ] ++ lib.optionals (!enableQt) [ "--set SDL_VIDEODRIVER ${if forceWayland then "wayland" else "x11"}" ]); binToBeWrapped = if enableQt then "PPSSPPQt" else "PPSSPPSDL"; in ''makeWrapper $out/share/ppsspp/bin/${binToBeWrapped} $out/bin/ppsspp ${wrapperArgs}''; </ins> meta = { homepage = "https://www.ppsspp.org/";

Discussion:
When adding the ppsspp package (or any of its derivates such as ppsspp-sdl-wayland) and running a game, I would get very severe graphical glitches during cutscene or video playback. After reaching out to the PPSSPP team, they mentioned that building with the USESYSTEMFFMPEG flag set to true can cause these issues and is not recommended. After locally building PPSSPP using the file from this repo modified to have USESYSTEMFFMPEG = false (and removing the ffmpeg4 build inputs), I can confirm that the games that I used to have graphical glitches on, now work perfectly. I can create a pull request for this but this is my first time working with packaging in nix and wanted to see if there was a specific reason why USESYSTEMFFMPEG is used (or if it's maybe against design principles of nix to use bundled ffmpeg libraries in apps) Steps to reproduce the behavior: package ppsspp as normal -you get behaviour similar to the before screenshot package ppsspp using modified that has USESYSTEMFFMPEG = false -you get behaviour similar to the after screenshot The after behaviour is expected. Before: <img width="567" alt="Screenshot 2024-04-16 " src=""<img width="563" alt="Screenshot 2024-04-16 " src=""After: ! Please run and paste the result. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
By default we prefer to use system libraries, in order to avoid duplication and increase "cache hits" from Hydra. Further, I particularly subscribe to some recommendations from Gentoo team: Nonetheless I will verify this issue tomorrow or asap
I agree with that statement to limit dependency bundling as much as possible, but happy to see what you get out of your testing :). I'm good for now since I build the package myself with my modified
Would be interesting to know why they bundle ffmpeg and what patches they use