Commit 8cf0d3a7 authored by George Huebner's avatar George Huebner Committed by Bjørn Forsman
Browse files

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).
parent b69795ae
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -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";