14 , gobject-introspection
28 , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
34 stdenv.mkDerivation (finalAttrs: {
38 outputs = [ "out" "dev" ]
39 ++ lib.optional (gtkVersion != null) "devdoc";
41 src = fetchFromGitLab {
42 domain = "gitlab.gnome.org";
45 rev = finalAttrs.version;
46 hash = "sha256-dVCvf4eTIJlrSzG6xLdKU47N9uAtHDwRrGkWtSmqbEU=";
50 # VTE needs a small patch to work with musl:
51 # https://gitlab.gnome.org/GNOME/vte/issues/72
52 # Taken from https://git.alpinelinux.org/aports/tree/community/vte3
54 name = "0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch";
55 url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd";
56 hash = "sha256-FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU=";
58 # build: Add fast_float dependency
59 # https://gitlab.gnome.org/GNOME/vte/-/issues/2823
61 name = "0003-build-Add-fast_float-dependency.patch";
62 url = "https://gitlab.gnome.org/GNOME/vte/-/commit/f6095fca4d1baf950817e7010e6f1e7c313b9e2e.patch";
63 hash = "sha256-EL9PPiI5pDJOXf4Ck4nkRte/jHx/QWbxkjDFRSsp+so=";
66 name = "0003-widget-termprops-Use-fast_float.patch";
67 url = "https://gitlab.gnome.org/GNOME/vte/-/commit/6c2761f51a0400772f443f12ea23a75576e195d3.patch";
68 hash = "sha256-jjM9bhl8EhtylUIQ2nMSNX3ugnkZQP/2POvSUDW0LM0=";
71 name = "0003-build-Use-correct-path-to-include-fast_float.h.patch";
72 url = "https://gitlab.gnome.org/GNOME/vte/-/commit/d09330585e648b5c9991dffab4a06d1f127bf916.patch";
73 hash = "sha256-YGVXt2VojljYgTcmahQ2YEZGEysyUSwk+snQfoipJ+E=";
94 pango # duplicated with propagatedBuildInputs to support gtkVersion == null
99 ] ++ lib.optionals systemdSupport [
103 # Required by vte-2.91.pc.
104 propagatedBuildInputs = lib.optionals (gtkVersion != null) [
105 (assert (gtkVersion == "3" || gtkVersion == "4");
106 if gtkVersion == "3" then gtk3 else gtk4)
113 (lib.mesonBool "gtk3" (gtkVersion == "3"))
114 (lib.mesonBool "gtk4" (gtkVersion == "4"))
115 ] ++ lib.optionals (!systemdSupport) [
117 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
118 # -Bsymbolic-functions is not supported on darwin
119 "-D_b_symbolic_functions=false"
122 # error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
123 env.NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument"
124 ++ lib.optional stdenv.cc.isClang "-Wno-cast-function-type-strict");
128 patchShebangs src/parser-seq.py
129 patchShebangs src/minifont-coverage.py
130 patchShebangs src/modes.py
134 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
135 moveToOutput "share/doc" "$devdoc"
139 updateScript = gnome.updateScript {
141 versionPolicy = "odd-unstable";
144 inherit (nixosTests.terminal-emulators) gnome-terminal lxterminal mlterm roxterm sakura stupidterm terminator termite xfce4-terminal;
145 blackbox-terminal = blackbox-terminal.override { sixelSupport = true; };
150 homepage = "https://www.gnome.org/";
151 description = "Library implementing a terminal emulator widget for GTK";
153 VTE is a library (libvte) implementing a terminal emulator widget for
154 GTK, and a minimal sample application (vte) using that. Vte is
155 mainly used in gnome-terminal, but can also be used to embed a
156 console/terminal in games, editors, IDEs, etc. VTE supports Unicode and
157 character set conversion, as well as emulating any terminal known to
158 the system's terminfo database.
160 license = licenses.lgpl3Plus;
161 maintainers = with maintainers; [ astsmtl antono ] ++ teams.gnome.members;
162 platforms = platforms.unix;