2019-09-04 00:02:39 +00:00
|
|
|
{ stdenv
|
2019-10-21 19:30:02 +00:00
|
|
|
, lib
|
2024-08-07 13:37:28 +00:00
|
|
|
, fetchFromGitLab
|
2019-10-21 19:30:02 +00:00
|
|
|
, fetchpatch
|
2019-09-04 00:02:39 +00:00
|
|
|
, gettext
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-09-04 00:02:39 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-05-07 21:18:14 +00:00
|
|
|
, gnome
|
2019-09-04 00:02:39 +00:00
|
|
|
, glib
|
|
|
|
, gtk3
|
2022-07-24 06:10:45 +00:00
|
|
|
, gtk4
|
|
|
|
, gtkVersion ? "3"
|
2019-09-04 00:02:39 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, vala
|
2021-03-21 07:28:32 +00:00
|
|
|
, python3
|
2022-08-13 08:37:02 +00:00
|
|
|
, gi-docgen
|
2019-09-04 00:02:39 +00:00
|
|
|
, libxml2
|
|
|
|
, gnutls
|
|
|
|
, gperf
|
|
|
|
, pango
|
|
|
|
, pcre2
|
2023-08-09 09:30:29 +00:00
|
|
|
, cairo
|
2019-09-04 00:02:39 +00:00
|
|
|
, fribidi
|
2024-02-13 11:28:15 +00:00
|
|
|
, lz4
|
2020-02-08 23:08:44 +00:00
|
|
|
, icu
|
|
|
|
, systemd
|
2022-09-21 07:04:52 +00:00
|
|
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
2024-11-04 19:42:27 +00:00
|
|
|
, fast-float
|
2020-11-13 19:01:30 +00:00
|
|
|
, nixosTests
|
2024-05-05 12:00:26 +00:00
|
|
|
, blackbox-terminal
|
2016-09-18 19:35:23 +00:00
|
|
|
}:
|
|
|
|
|
2023-12-16 20:40:09 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2018-12-25 23:15:46 +00:00
|
|
|
pname = "vte";
|
2024-11-25 06:32:04 +00:00
|
|
|
version = "0.78.2";
|
2019-09-04 00:02:39 +00:00
|
|
|
|
2022-12-27 03:24:56 +00:00
|
|
|
outputs = [ "out" "dev" ]
|
|
|
|
++ lib.optional (gtkVersion != null) "devdoc";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
2024-08-07 13:37:28 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "GNOME";
|
|
|
|
repo = "vte";
|
|
|
|
rev = finalAttrs.version;
|
2024-11-25 06:32:04 +00:00
|
|
|
hash = "sha256-ZUECInBRNYkXJtGveLq8SR6YdWqJA0y9UJSxmc8mVNk=";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2021-03-21 07:28:32 +00:00
|
|
|
patches = [
|
|
|
|
# VTE needs a small patch to work with musl:
|
|
|
|
# https://gitlab.gnome.org/GNOME/vte/issues/72
|
|
|
|
# Taken from https://git.alpinelinux.org/aports/tree/community/vte3
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch";
|
|
|
|
url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd";
|
2024-02-13 11:28:15 +00:00
|
|
|
hash = "sha256-FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU=";
|
2021-03-21 07:28:32 +00:00
|
|
|
})
|
2024-11-04 19:42:27 +00:00
|
|
|
# build: Add fast_float dependency
|
|
|
|
# https://gitlab.gnome.org/GNOME/vte/-/issues/2823
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0003-build-Add-fast_float-dependency.patch";
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/vte/-/commit/f6095fca4d1baf950817e7010e6f1e7c313b9e2e.patch";
|
|
|
|
hash = "sha256-EL9PPiI5pDJOXf4Ck4nkRte/jHx/QWbxkjDFRSsp+so=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0003-widget-termprops-Use-fast_float.patch";
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/vte/-/commit/6c2761f51a0400772f443f12ea23a75576e195d3.patch";
|
|
|
|
hash = "sha256-jjM9bhl8EhtylUIQ2nMSNX3ugnkZQP/2POvSUDW0LM0=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0003-build-Use-correct-path-to-include-fast_float.h.patch";
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/vte/-/commit/d09330585e648b5c9991dffab4a06d1f127bf916.patch";
|
|
|
|
hash = "sha256-YGVXt2VojljYgTcmahQ2YEZGEysyUSwk+snQfoipJ+E=";
|
|
|
|
})
|
2021-03-21 07:28:32 +00:00
|
|
|
];
|
|
|
|
|
2019-09-04 00:02:39 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
gperf
|
|
|
|
libxml2
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-09-04 00:02:39 +00:00
|
|
|
vala
|
2021-03-21 07:28:32 +00:00
|
|
|
python3
|
2022-08-13 08:37:02 +00:00
|
|
|
gi-docgen
|
2019-09-04 00:02:39 +00:00
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2019-09-04 00:02:39 +00:00
|
|
|
buildInputs = [
|
2023-08-09 09:30:29 +00:00
|
|
|
cairo
|
2019-09-04 00:02:39 +00:00
|
|
|
fribidi
|
2018-08-09 02:54:17 +00:00
|
|
|
gnutls
|
2023-07-19 11:54:16 +00:00
|
|
|
pango # duplicated with propagatedBuildInputs to support gtkVersion == null
|
2018-08-09 02:54:17 +00:00
|
|
|
pcre2
|
2024-02-13 11:28:15 +00:00
|
|
|
lz4
|
2020-02-08 23:08:44 +00:00
|
|
|
icu
|
2024-11-04 19:42:27 +00:00
|
|
|
fast-float
|
2022-03-13 20:46:57 +00:00
|
|
|
] ++ lib.optionals systemdSupport [
|
2020-02-08 23:08:44 +00:00
|
|
|
systemd
|
2018-08-09 02:54:17 +00:00
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2022-12-27 03:24:56 +00:00
|
|
|
# Required by vte-2.91.pc.
|
|
|
|
propagatedBuildInputs = lib.optionals (gtkVersion != null) [
|
|
|
|
(assert (gtkVersion == "3" || gtkVersion == "4");
|
|
|
|
if gtkVersion == "3" then gtk3 else gtk4)
|
2019-09-04 00:02:39 +00:00
|
|
|
glib
|
|
|
|
pango
|
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2022-08-13 08:37:02 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Ddocs=true"
|
2023-08-09 09:30:29 +00:00
|
|
|
(lib.mesonBool "gtk3" (gtkVersion == "3"))
|
|
|
|
(lib.mesonBool "gtk4" (gtkVersion == "4"))
|
2022-08-13 08:37:02 +00:00
|
|
|
] ++ lib.optionals (!systemdSupport) [
|
2022-03-13 20:46:57 +00:00
|
|
|
"-D_systemd=false"
|
2022-08-01 12:42:48 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
# -Bsymbolic-functions is not supported on darwin
|
|
|
|
"-D_b_symbolic_functions=false"
|
2022-03-13 20:46:57 +00:00
|
|
|
];
|
|
|
|
|
2022-10-10 21:07:47 +00:00
|
|
|
# error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
|
2024-05-11 20:30:39 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument"
|
|
|
|
++ lib.optional stdenv.cc.isClang "-Wno-cast-function-type-strict");
|
2022-10-10 21:07:47 +00:00
|
|
|
|
2019-09-04 00:02:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs perf/*
|
2021-03-21 07:28:32 +00:00
|
|
|
patchShebangs src/parser-seq.py
|
2024-08-07 13:37:28 +00:00
|
|
|
patchShebangs src/minifont-coverage.py
|
2021-03-21 07:28:32 +00:00
|
|
|
patchShebangs src/modes.py
|
2019-09-04 00:02:39 +00:00
|
|
|
'';
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2022-08-13 08:37:02 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2021-03-20 23:57:24 +00:00
|
|
|
passthru = {
|
2021-05-07 21:18:14 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2023-12-16 20:40:09 +00:00
|
|
|
packageName = "vte";
|
2021-03-20 23:57:24 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
|
|
|
};
|
2020-11-13 19:01:30 +00:00
|
|
|
tests = {
|
|
|
|
inherit (nixosTests.terminal-emulators) gnome-terminal lxterminal mlterm roxterm sakura stupidterm terminator termite xfce4-terminal;
|
2024-05-05 12:00:26 +00:00
|
|
|
blackbox-terminal = blackbox-terminal.override { sixelSupport = true; };
|
2020-11-13 19:01:30 +00:00
|
|
|
};
|
2021-03-20 23:57:24 +00:00
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnome.org/";
|
2019-09-03 22:49:40 +00:00
|
|
|
description = "Library implementing a terminal emulator widget for GTK";
|
2016-09-18 19:35:23 +00:00
|
|
|
longDescription = ''
|
|
|
|
VTE is a library (libvte) implementing a terminal emulator widget for
|
2019-09-03 22:49:40 +00:00
|
|
|
GTK, and a minimal sample application (vte) using that. Vte is
|
2016-09-18 19:35:23 +00:00
|
|
|
mainly used in gnome-terminal, but can also be used to embed a
|
|
|
|
console/terminal in games, editors, IDEs, etc. VTE supports Unicode and
|
|
|
|
character set conversion, as well as emulating any terminal known to
|
|
|
|
the system's terminfo database.
|
|
|
|
'';
|
2021-03-21 07:28:32 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2021-05-07 13:35:21 +00:00
|
|
|
maintainers = with maintainers; [ astsmtl antono ] ++ teams.gnome.members;
|
2019-09-04 00:02:39 +00:00
|
|
|
platforms = platforms.unix;
|
2016-09-18 19:35:23 +00:00
|
|
|
};
|
2023-12-16 20:40:09 +00:00
|
|
|
})
|