diff --git a/pkgs/applications/emulators/86box/default.nix b/pkgs/applications/emulators/86box/default.nix index 43b5dfae541e..d1a414fc0792 100644 --- a/pkgs/applications/emulators/86box/default.nix +++ b/pkgs/applications/emulators/86box/default.nix @@ -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";