gtkwave: use desktopToDarwinBundle

This has the primary benefit of preventing the name of the wrapper
from leaking into the UI and process info (see #60260 for more info).
This commit is contained in:
George Huebner 2024-10-22 08:45:04 -05:00 committed by Bjørn Forsman
parent b69795ae41
commit 8cf0d3a761

View File

@ -12,6 +12,7 @@
, tk
, wrapGAppsHook3
, xz
, desktopToDarwinBundle
}:
stdenv.mkDerivation rec {
@ -23,7 +24,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VKpFeI1tUq+2WcOu8zWq/eDvLImQp3cPjqpk5X8ic0Y=";
};
nativeBuildInputs = [ pkg-config wrapGAppsHook3 ];
nativeBuildInputs = [
pkg-config wrapGAppsHook3
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
desktopToDarwinBundle
];
buildInputs = [ bzip2 glib gperf gtk3 judy tcl tk xz ]
++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration;
@ -42,6 +47,14 @@ stdenv.mkDerivation rec {
"--enable-gtk3"
];
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
mv $out/bin/.gtkwave-wrapped $out/Applications/GTKWave.app/Contents/MacOS/.gtkwave-wrapped
makeWrapper $out/Applications/GTKWave.app/Contents/MacOS/.gtkwave-wrapped $out/Applications/GTKWave.app/Contents/MacOS/GTKWave \
--inherit-argv0 \
"''${gappsWrapperArgs[@]}"
ln -sf $out/Applications/GTKWave.app/Contents/MacOS/GTKWave $out/bin/gtkwave
'';
meta = {
description = "VCD/Waveform viewer for Unix and Win32";
homepage = "https://gtkwave.sourceforge.net";