1{
2 lib,
3 stdenv,
4 fetchurl,
5 meson,
6 ninja,
7 pkg-config,
8 gobject-introspection,
9 vala,
10 gi-docgen,
11 glib,
12 gtk4,
13 gtksourceview5,
14 enchant,
15 icu,
16 libsysprof-capture,
17 gnome,
18}:
19
20stdenv.mkDerivation (finalAttrs: {
21 pname = "libspelling";
22 version = "0.4.8";
23
24 outputs = [
25 "out"
26 "dev"
27 "devdoc"
28 ];
29
30 src = fetchurl {
31 url = "mirror://gnome/sources/libspelling/${lib.versions.majorMinor finalAttrs.version}/libspelling-${finalAttrs.version}.tar.xz";
32 hash = "sha256-J3ZGKFgY2nspXvAHssXr2BXQkws60JdQWzztlpZa9Rc=";
33 };
34
35 nativeBuildInputs = [
36 meson
37 ninja
38 pkg-config
39 gobject-introspection
40 vala
41 gi-docgen
42 ];
43
44 buildInputs = [
45 enchant
46 icu
47 libsysprof-capture
48 ];
49
50 propagatedBuildInputs = [
51 # These were moved from buildInputs because they are
52 # listed in `Requires` key of `libspelling-1.pc`
53 glib
54 gtk4
55 gtksourceview5
56 ];
57
58 postFixup = ''
59 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
60 moveToOutput "share/doc" "$devdoc"
61 '';
62
63 passthru.updateScript = gnome.updateScript {
64 packageName = "libspelling";
65 };
66
67 meta = {
68 description = "Spellcheck library for GTK 4";
69 homepage = "https://gitlab.gnome.org/GNOME/libspelling";
70 license = lib.licenses.lgpl21Plus;
71 changelog = "https://gitlab.gnome.org/GNOME/libspelling/-/raw/${finalAttrs.version}/NEWS";
72 maintainers = with lib.maintainers; [ chuangzhu ];
73 teams = [ lib.teams.gnome ];
74 };
75})