20 gobject-introspection,
27 stdenv.mkDerivation (finalAttrs: {
28 pname = "gtksourceview";
38 inherit (finalAttrs) pname version;
41 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
42 sha256 = "fsnRj7KD0fhKOj7/O3pysJoQycAGWXs/uru1lYQgqH0=";
46 # By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
47 # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
48 # Since this is not generally true with Nix, let’s add $out/share unconditionally.
49 ./4.x-nix_share_path.patch
51 # nix.lang: Add Nix syntax highlighting
52 # https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/303
54 url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/685b3bd08869c2aefe33fad696a7f5f2dc831016.patch";
55 hash = "sha256-yeYXJ2l/QS857C4UXOnMFyh0JsptA0TQt0lfD7wN5ic=";
58 # nix.lang: fix section name
60 url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/1dbbb01da98140e0b2d5d0c6c2df29247650ed83.patch";
61 hash = "sha256-6HxLKQyI5DDvmKhmldQlwVPV62RfFa2gwWbcHA2cICs=";
84 propagatedBuildInputs = [
85 # Required by gtksourceview-4.0.pc
87 # Used by gtk_source_language_manager_guess_language
97 # https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/295
98 # build: drop unnecessary vapigen check
99 substituteInPlace meson.build \
100 --replace "if generate_vapi" "if false"
103 # Broken by PCRE 2 bump in GLib.
104 # https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/283
110 XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
111 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
112 --config-file=${dbus}/share/dbus-1/session.conf \
113 meson test --no-rebuild --print-errorlogs
119 updateScript = gnome.updateScript {
120 packageName = "gtksourceview";
121 attrPath = "gtksourceview4";
122 versionPolicy = "odd-unstable";
127 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
130 description = "Source code editing widget for GTK";
131 homepage = "https://gitlab.gnome.org/GNOME/gtksourceview";
132 pkgConfigModules = [ "gtksourceview-4" ];
133 platforms = platforms.unix;
134 license = licenses.lgpl21Plus;
135 maintainers = teams.gnome.members;