2021-05-20 23:08:51 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchurl
|
|
|
|
|
, meson
|
|
|
|
|
, ninja
|
|
|
|
|
, pkg-config
|
|
|
|
|
, atk
|
|
|
|
|
, cairo
|
|
|
|
|
, glib
|
|
|
|
|
, gtk3
|
|
|
|
|
, pango
|
|
|
|
|
, fribidi
|
|
|
|
|
, vala
|
|
|
|
|
, libxml2
|
|
|
|
|
, perl
|
|
|
|
|
, gettext
|
|
|
|
|
, gnome
|
|
|
|
|
, gobject-introspection
|
|
|
|
|
, dbus
|
|
|
|
|
, xvfb-run
|
|
|
|
|
, shared-mime-info
|
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "gtksourceview";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
version = "4.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
sha256 = "fsnRj7KD0fhKOj7/O3pysJoQycAGWXs/uru1lYQgqH0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
|
patches = [
|
2021-05-20 23:08:51 +00:00
|
|
|
|
# By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
|
|
|
|
|
# but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
|
|
|
|
|
# Since this is not generally true with Nix, let’s add $out/share unconditionally.
|
2021-03-20 04:20:00 +00:00
|
|
|
|
./4.x-nix_share_path.patch
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
meson
|
|
|
|
|
ninja
|
|
|
|
|
pkg-config
|
|
|
|
|
gettext
|
|
|
|
|
perl
|
|
|
|
|
gobject-introspection
|
|
|
|
|
vala
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
|
atk
|
|
|
|
|
cairo
|
|
|
|
|
glib
|
|
|
|
|
pango
|
|
|
|
|
fribidi
|
|
|
|
|
libxml2
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
# Required by gtksourceview-4.0.pc
|
|
|
|
|
gtk3
|
|
|
|
|
# Used by gtk_source_language_manager_guess_language
|
|
|
|
|
shared-mime-info
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
|
xvfb-run
|
|
|
|
|
dbus
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
# https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/295
|
|
|
|
|
# build: drop unnecessary vapigen check
|
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
|
--replace "if generate_vapi" "if false"
|
|
|
|
|
'';
|
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
|
# Broken by PCRE 2 bump in GLib.
|
|
|
|
|
# https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/283
|
|
|
|
|
doCheck = false;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
checkPhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
|
runHook preCheck
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
|
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
2022-12-02 08:20:57 +00:00
|
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2020-04-24 23:36:52 +00:00
|
|
|
|
meson test --no-rebuild --print-errorlogs
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
packageName = "gtksourceview";
|
|
|
|
|
attrPath = "gtksourceview4";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
versionPolicy = "odd-unstable";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
freeze = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
|
description = "Source code editing widget for GTK";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
platforms = platforms.unix;
|
|
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
|
};
|
|
|
|
|
}
|