Loading pkgs/applications/graphics/apitrace/default.nix +60 −46 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ libglvnd, gtest, brotli, enableGui ? true, }: stdenv.mkDerivation rec { Loading @@ -29,27 +30,38 @@ stdenv.mkDerivation rec { # LD_PRELOAD wrappers need to be statically linked to work against all kinds # of games -- so it's fine to use e.g. bundled snappy. buildInputs = [ buildInputs = [ libX11 procps python3 libdwarf qtbase gtest brotli ] ++ lib.optionals enableGui [ qtbase ]; nativeBuildInputs = [ nativeBuildInputs = [ cmake pkg-config python3 ] ++ lib.optionals enableGui [ wrapQtAppsHook ]; cmakeFlags = [ (lib.cmakeBool "ENABLE_GUI" enableGui) ]; # Don't automatically wrap all binaries, I prefer to explicitly only wrap # `qapitrace`. dontWrapQtApps = true; postFixup = '' postFixup = '' # Since https://github.com/NixOS/nixpkgs/pull/60985, we add `/run-opengl-driver[-32]` # to the `RUNPATH` of dispatcher libraries `dlopen()` ing OpenGL drivers. Loading Loading @@ -83,6 +95,8 @@ stdenv.mkDerivation rec { patchelf --set-rpath "${lib.makeLibraryPath [ libglvnd ]}:$(patchelf --print-rpath $i)" $i done '' + lib.optionalString enableGui '' wrapQtApp $out/bin/qapitrace ''; Loading Loading
pkgs/applications/graphics/apitrace/default.nix +60 −46 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ libglvnd, gtest, brotli, enableGui ? true, }: stdenv.mkDerivation rec { Loading @@ -29,27 +30,38 @@ stdenv.mkDerivation rec { # LD_PRELOAD wrappers need to be statically linked to work against all kinds # of games -- so it's fine to use e.g. bundled snappy. buildInputs = [ buildInputs = [ libX11 procps python3 libdwarf qtbase gtest brotli ] ++ lib.optionals enableGui [ qtbase ]; nativeBuildInputs = [ nativeBuildInputs = [ cmake pkg-config python3 ] ++ lib.optionals enableGui [ wrapQtAppsHook ]; cmakeFlags = [ (lib.cmakeBool "ENABLE_GUI" enableGui) ]; # Don't automatically wrap all binaries, I prefer to explicitly only wrap # `qapitrace`. dontWrapQtApps = true; postFixup = '' postFixup = '' # Since https://github.com/NixOS/nixpkgs/pull/60985, we add `/run-opengl-driver[-32]` # to the `RUNPATH` of dispatcher libraries `dlopen()` ing OpenGL drivers. Loading Loading @@ -83,6 +95,8 @@ stdenv.mkDerivation rec { patchelf --set-rpath "${lib.makeLibraryPath [ libglvnd ]}:$(patchelf --print-rpath $i)" $i done '' + lib.optionalString enableGui '' wrapQtApp $out/bin/qapitrace ''; Loading