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";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
version = "4.8.2";
|
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";
|
2021-10-14 00:43:12 +00:00
|
|
|
|
sha256 = "1k1pava84ywgq62xl5bz8y3zm7z2kz6kkgp423c0y02jrgjyfbc4";
|
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
|
|
|
|
|
|
|
|
|
doCheck = stdenv.isLinux;
|
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 \
|
|
|
|
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
|
|
|
|
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";
|
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;
|
|
|
|
|
};
|
|
|
|
|
}
|