15 , desktopToDarwinBundle
18 stdenv.mkDerivation rec {
23 url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz";
24 sha256 = "sha256-VKpFeI1tUq+2WcOu8zWq/eDvLImQp3cPjqpk5X8ic0Y=";
28 pkg-config wrapGAppsHook3
29 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
32 buildInputs = [ bzip2 glib gperf gtk3 judy tcl tk xz ]
33 ++ lib.optional stdenv.hostPlatform.isDarwin gtk-mac-integration;
35 # fix compilation under Darwin
36 # remove these patches upon next release
37 # https://github.com/gtkwave/gtkwave/pull/136
39 ./0001-Fix-detection-of-quartz-in-gdk-3.0-target.patch
40 ./0002-Check-GDK_WINDOWING_X11-macro-when-using-GtkPlug.patch
44 "--with-tcl=${tcl}/lib"
50 postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
51 mv $out/bin/.gtkwave-wrapped $out/Applications/GTKWave.app/Contents/MacOS/.gtkwave-wrapped
52 makeWrapper $out/Applications/GTKWave.app/Contents/MacOS/.gtkwave-wrapped $out/Applications/GTKWave.app/Contents/MacOS/GTKWave \
54 "''${gappsWrapperArgs[@]}"
55 ln -sf $out/Applications/GTKWave.app/Contents/MacOS/GTKWave $out/bin/gtkwave
59 description = "VCD/Waveform viewer for Unix and Win32";
60 homepage = "https://gtkwave.sourceforge.net";
61 license = lib.licenses.gpl2Plus;
62 maintainers = with lib.maintainers; [ thoughtpolice jiegec jleightcap ];
63 platforms = lib.platforms.linux ++ lib.platforms.darwin;