git.iko.soy/typeable/nixpkgs
on master help sign in
gtksourceview5: init at 5.0.0
7bb72bbJan Tojnar
pkgs/development/libraries/gtksourceview/5.x.nixnew file+99
@@ -0,0 +1,99 @@
1+{ lib
2+, stdenv
3+, fetchurl
4+, meson
5+, ninja
6+, pkg-config
7+, glib
8+, pcre2
9+, gtk4
10+, pango
11+, fribidi
12+, vala
13+, libxml2
14+, perl
15+, gettext
16+, gnome3
17+, gobject-introspection
18+, dbus
19+, xvfb_run
20+, shared-mime-info
21+}:
22+
23+stdenv.mkDerivation rec {
24+ pname = "gtksourceview";
25+ version = "5.0.0";
26+
27+ outputs = [ "out" "dev" ];
28+
29+ src = fetchurl {
30+ url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
31+ sha256 = "1hyrmh9r1zd5kjh5ch9d7bhk2kphbqhm7ijfxfkcdln8q0rnd0k4";
32+ };
33+
34+ patches = [
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
39+ ];
40+
41+ nativeBuildInputs = [
42+ meson
43+ ninja
44+ pkg-config
45+ gettext
46+ perl
47+ gobject-introspection
48+ vala
49+ ];
50+
51+ buildInputs = [
52+ glib
53+ pcre2
54+ pango
55+ fribidi
56+ libxml2
57+ ];
58+
59+ propagatedBuildInputs = [
60+ # Required by gtksourceview-5.0.pc
61+ gtk4
62+ # Used by gtk_source_language_manager_guess_language
63+ shared-mime-info
64+ ];
65+
66+ checkInputs = [
67+ xvfb_run
68+ dbus
69+ ];
70+
71+ doCheck = stdenv.isLinux;
72+
73+ checkPhase = ''
74+ runHook preCheck
75+
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
80+
81+ runHook postCheck
82+ '';
83+
84+ passthru = {
85+ updateScript = gnome3.updateScript {
86+ packageName = "gtksourceview";
87+ attrPath = "gtksourceview5";
88+ versionPolicy = "odd-unstable";
89+ };
90+ };
91+
92+ meta = with lib; {
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;
98+ };
99+}
pkgs/top-level/all-packages.nix+2
@@ -14979,6 +14979,8 @@ in
14979
14979
14980 gtksourceview4 = callPackage ../development/libraries/gtksourceview/4.x.nix { };
14980 gtksourceview4 = callPackage ../development/libraries/gtksourceview/4.x.nix { };
14981
14981
14982+ gtksourceview5 = callPackage ../development/libraries/gtksourceview/5.x.nix { };
14983+
14982 gtksourceviewmm = callPackage ../development/libraries/gtksourceviewmm { };
14984 gtksourceviewmm = callPackage ../development/libraries/gtksourceviewmm { };
14983
14985
14984 gtksourceviewmm4 = callPackage ../development/libraries/gtksourceviewmm/4.x.nix { };
14986 gtksourceviewmm4 = callPackage ../development/libraries/gtksourceviewmm/4.x.nix { };