1 { lib, stdenv, fetchurl, fetchpatch, pkg-config, atk, cairo, glib, gtk3, pango, fribidi, vala
2 , libxml2, perl, gettext, gnome3, gobject-introspection, dbus, xvfb_run, shared-mime-info
5 stdenv.mkDerivation rec {
6 pname = "gtksourceview";
10 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
11 sha256 = "0WPXG1/K+8Wx7sbdhB7b283dOnURzV/c/9hri7/mmsE=";
14 propagatedBuildInputs = [
15 # Required by gtksourceview-4.0.pc
17 # Used by gtk_source_language_manager_guess_language
21 outputs = [ "out" "dev" ];
23 nativeBuildInputs = [ meson ninja pkg-config gettext perl gobject-introspection vala ];
25 checkInputs = [ xvfb_run dbus ];
27 buildInputs = [ atk cairo glib pango fribidi libxml2 ];
30 ./4.x-nix_share_path.patch
32 # fixes intermittent "gtksourceview-gresources.h: no such file" errors
34 name = "ensure-access-to-resources-in-corelib-build.patch";
35 url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/9bea9d1c4a56310701717bb106c52a5324ee392a.patch";
36 sha256 = "sha256-rSB6lOFEyz58HfOSj7ZM48/tHxhqbtWWbh60JuySAZ0=";
40 enableParallelBuilding = true;
42 doCheck = stdenv.isLinux;
44 XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
45 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
46 --config-file=${dbus.daemon}/share/dbus-1/session.conf \
47 meson test --no-rebuild --print-errorlogs
51 updateScript = gnome3.updateScript {
52 packageName = "gtksourceview";
53 attrPath = "gtksourceview4";
58 homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
59 platforms = with platforms; linux ++ darwin;
60 license = licenses.lgpl21;
61 maintainers = teams.gnome.members;