@@ -0,0 +1,99 @@
17+, gobject-introspection
23+stdenv.mkDerivation rec {
24+ pname = "gtksourceview";
27+ outputs = [ "out" "dev" ];
30+ url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
31+ sha256 = "1hyrmh9r1zd5kjh5ch9d7bhk2kphbqhm7ijfxfkcdln8q0rnd0k4";
35+ # By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
36+ # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
37+ # Since this is not generally true with Nix, let’s add $out/share unconditionally.
38+ ./4.x-nix_share_path.patch
41+ nativeBuildInputs = [
47+ gobject-introspection
59+ propagatedBuildInputs = [
60+ # Required by gtksourceview-5.0.pc
62+ # Used by gtk_source_language_manager_guess_language
71+ doCheck = stdenv.isLinux;
76+ XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
77+ xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
78+ --config-file=${dbus.daemon}/share/dbus-1/session.conf \
79+ meson test --no-rebuild --print-errorlogs
85+ updateScript = gnome3.updateScript {
86+ packageName = "gtksourceview";
87+ attrPath = "gtksourceview5";
88+ versionPolicy = "odd-unstable";
93+ description = "Source code editing widget for GTK";
94+ homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
95+ platforms = platforms.unix;
96+ license = licenses.lgpl21Plus;
97+ maintainers = teams.gnome.members;