19 gobject-introspection,
26 stdenv.mkDerivation (finalAttrs: {
27 pname = "gtksourceview";
37 url = "mirror://gnome/sources/gtksourceview/${lib.versions.majorMinor finalAttrs.version}/gtksourceview-${finalAttrs.version}.tar.xz";
38 hash = "sha256-Gm04emgHX4rv1OdSz0hxd8SmgjsU/4pDSYaFiurvYmQ=";
42 # By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
43 # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
44 # Since this is not generally true with Nix, let’s add $out/share unconditionally.
45 ./4.x-nix_share_path.patch
57 gtk4 # for gtk4-update-icon-cache checked during configure
68 propagatedBuildInputs = [
69 # Required by gtksourceview-5.0.pc
71 # Used by gtk_source_language_manager_guess_language
81 "-Ddocumentation=true"
84 doCheck = stdenv.hostPlatform.isLinux;
90 XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
92 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
93 --config-file=${dbus}/share/dbus-1/session.conf \
94 meson test --no-rebuild --print-errorlogs
100 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
101 moveToOutput "share/doc" "$devdoc"
105 updateScript = gnome.updateScript {
106 packageName = "gtksourceview";
107 attrPath = "gtksourceview5";
108 versionPolicy = "odd-unstable";
112 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
115 description = "Source code editing widget for GTK";
116 homepage = "https://gitlab.gnome.org/GNOME/gtksourceview";
117 pkgConfigModules = [ "gtksourceview-5" ];
118 platforms = platforms.unix;
119 license = licenses.lgpl21Plus;
120 maintainers = teams.gnome.members;