15 gobject-introspection,
29 systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
35 stdenv.mkDerivation (finalAttrs: {
42 ] ++ lib.optional (gtkVersion != null) "devdoc";
45 url = "mirror://gnome/sources/vte/${lib.versions.majorMinor finalAttrs.version}/vte-${finalAttrs.version}.tar.xz";
46 hash = "sha256-l+KsOie8V1U1iiI/VfWiUYZUqgNhv8YaGWwcLgh5jv8=";
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=";
95 pango # duplicated with propagatedBuildInputs to support gtkVersion == null
101 ++ lib.optionals systemdSupport [
105 # Required by vte-2.91.pc.
106 propagatedBuildInputs = lib.optionals (gtkVersion != null) [
108 assert (gtkVersion == "3" || gtkVersion == "4");
109 if gtkVersion == "3" then gtk3 else gtk4
118 (lib.mesonBool "gtk3" (gtkVersion == "3"))
119 (lib.mesonBool "gtk4" (gtkVersion == "4"))
121 ++ lib.optionals (!systemdSupport) [
124 ++ lib.optionals stdenv.hostPlatform.isDarwin [
125 # -Bsymbolic-functions is not supported on darwin
126 "-D_b_symbolic_functions=false"
129 # error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
130 env.NIX_CFLAGS_COMPILE = toString (
131 lib.optional stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument"
132 ++ lib.optional stdenv.cc.isClang "-Wno-cast-function-type-strict"
137 patchShebangs src/parser-seq.py
138 patchShebangs src/minifont-coverage.py
139 patchShebangs src/modes.py
143 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
144 moveToOutput "share/doc" "$devdoc"
148 updateScript = gnome.updateScript {
150 versionPolicy = "odd-unstable";
153 inherit (nixosTests.terminal-emulators)
164 blackbox-terminal = blackbox-terminal.override { sixelSupport = true; };
169 homepage = "https://www.gnome.org/";
170 description = "Library implementing a terminal emulator widget for GTK";
172 VTE is a library (libvte) implementing a terminal emulator widget for
173 GTK, and a minimal sample application (vte) using that. Vte is
174 mainly used in gnome-terminal, but can also be used to embed a
175 console/terminal in games, editors, IDEs, etc. VTE supports Unicode and
176 character set conversion, as well as emulating any terminal known to
177 the system's terminfo database.
179 license = licenses.lgpl3Plus;
186 ++ teams.gnome.members;
187 platforms = platforms.unix;