14 , gobject-introspection
27 , systemdSupport ? stdenv.hostPlatform.isLinux
31 stdenv.mkDerivation rec {
35 outputs = [ "out" "dev" "devdoc" ];
38 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
39 sha256 = "sha256-H0YBy/6lMCuWkCIIyPGF5bGLJZtTWLyTzzkr9ZhxxbY=";
43 # VTE needs a small patch to work with musl:
44 # https://gitlab.gnome.org/GNOME/vte/issues/72
45 # Taken from https://git.alpinelinux.org/aports/tree/community/vte3
47 name = "0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch";
48 url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd";
49 sha256 = "FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU=";
72 ] ++ lib.optionals systemdSupport [
76 propagatedBuildInputs = assert (gtkVersion == "3" || gtkVersion == "4"); [
77 # Required by vte-2.91.pc.
78 (if gtkVersion == "3" then gtk3 else gtk4)
85 ] ++ lib.optionals (!systemdSupport) [
87 ] ++ lib.optionals (gtkVersion == "4") [
90 ] ++ lib.optionals stdenv.isDarwin [
91 # -Bsymbolic-functions is not supported on darwin
92 "-D_b_symbolic_functions=false"
95 # error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
96 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument";
100 patchShebangs src/box_drawing_generate.sh
101 patchShebangs src/parser-seq.py
102 patchShebangs src/modes.py
106 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
107 moveToOutput "share/doc" "$devdoc"
111 updateScript = gnome.updateScript {
113 versionPolicy = "odd-unstable";
116 inherit (nixosTests.terminal-emulators) gnome-terminal lxterminal mlterm roxterm sakura stupidterm terminator termite xfce4-terminal;
121 homepage = "https://www.gnome.org/";
122 description = "A library implementing a terminal emulator widget for GTK";
124 VTE is a library (libvte) implementing a terminal emulator widget for
125 GTK, and a minimal sample application (vte) using that. Vte is
126 mainly used in gnome-terminal, but can also be used to embed a
127 console/terminal in games, editors, IDEs, etc. VTE supports Unicode and
128 character set conversion, as well as emulating any terminal known to
129 the system's terminfo database.
131 license = licenses.lgpl3Plus;
132 maintainers = with maintainers; [ astsmtl antono ] ++ teams.gnome.members;
133 platforms = platforms.unix;