_86Box: simplify wrapping logic

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew 2024-03-24 11:12:18 -03:00
parent 3199d631af
commit cae20d2bf5
1 changed files with 3 additions and 9 deletions

View File

@ -59,21 +59,15 @@ stdenv.mkDerivation (finalAttrs: {
# Some libraries are loaded dynamically, but QLibrary doesn't seem to search
# the runpath, so use a wrapper instead.
postFixup = let
preFixup = let
libPath = lib.makeLibraryPath ([
libpcap
] ++ lib.optional unfreeEnableDiscord discord-gamesdk);
libPathVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
''
wrapProgram $out/bin/86Box \
"''${qtWrapperArgs[@]}" \
--prefix ${libPathVar} : "${libPath}"
in ''
makeWrapperArgs+=(--prefix ${libPathVar} : "${libPath}")
'';
# Do not wrap twice.
dontWrapQtApps = true;
meta = with lib; {
description = "Emulator of x86-based machines based on PCem.";
mainProgram = "86Box";