about summary refs log tree commit diff
path: root/pkgs/applications/science/electronics/gtkwave/default.nix
blob: 3e0f3613ba90311a0151f6ff69e64f0c3b1e90cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ bzip2
, fetchurl
, glib
, gperf
, gtk3
, gtk-mac-integration
, judy
, lib
, pkg-config
, stdenv
, tcl
, tk
, wrapGAppsHook3
, xz
}:

stdenv.mkDerivation rec {
  pname = "gtkwave";
  version = "3.3.119";

  src = fetchurl {
    url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz";
    sha256 = "sha256-6rPgnnZBEVwHhIv7MPfdDDu+K4y+RQF+leB327pqwDg=";
  };

  nativeBuildInputs = [ pkg-config wrapGAppsHook3 ];
  buildInputs = [ bzip2 glib gperf gtk3 judy tcl tk xz ]
    ++ lib.optional stdenv.isDarwin gtk-mac-integration;

  # fix compilation under Darwin
  # remove these patches upon next release
  # https://github.com/gtkwave/gtkwave/pull/136
  patches = [
    ./0001-Fix-detection-of-quartz-in-gdk-3.0-target.patch
    ./0002-Check-GDK_WINDOWING_X11-macro-when-using-GtkPlug.patch
  ];

  configureFlags = [
    "--with-tcl=${tcl}/lib"
    "--with-tk=${tk}/lib"
    "--enable-judy"
    "--enable-gtk3"
  ];

  meta = {
    description = "VCD/Waveform viewer for Unix and Win32";
    homepage = "https://gtkwave.sourceforge.net";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ thoughtpolice jiegec jleightcap ];
    platforms = lib.platforms.linux ++ lib.platforms.darwin;
  };
}