Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / gspell / default.nix
blobc4d15352020aa01976d7fb52250133c4a8081731
1 { stdenv
2 , lib
3 , buildPackages
4 , fetchurl
5 , pkg-config
6 , libxml2
7 , autoreconfHook
8 , gtk-doc
9 , glib
10 , gtk3
11 , enchant2
12 , icu
13 , vala
14 , gobject-introspection
15 , gnome
18 stdenv.mkDerivation rec {
19   pname = "gspell";
20   version = "1.12.2";
22   outputs = [ "out" "dev" ];
23   outputBin = "dev";
25   src = fetchurl {
26     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
27     sha256 = "tOmTvYJ+TOtqdwsbXolQ/OO+nIsrDL6yL9+ZKAjdITk=";
28   };
30   patches = [
31     # Extracted from: https://github.com/Homebrew/homebrew-core/blob/2a27fb86b08afc7ae6dff79cf64aafb8ecc93275/Formula/gspell.rb#L125-L149
32     # Dropped the GTK_MAC_* changes since gtk-mac-integration is not needed since 1.12.1
33     ./0001-Darwin-build-fix.patch
34   ];
36   nativeBuildInputs = [
37     pkg-config
38     vala
39     gobject-introspection
40     libxml2
41     autoreconfHook
42     gtk-doc
43     glib
44   ];
46   buildInputs = [
47     gtk3
48     icu
49     vala # for share/vala/Makefile.vapigen (PKG_CONFIG_VAPIGEN_VAPIGEN)
50   ];
52   propagatedBuildInputs = [
53     # required for pkg-config
54     enchant2
55   ];
57   configureFlags = [
58     "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
59     "GLIB_MKENUMS=${lib.getDev buildPackages.glib}/bin/glib-mkenums"
60     "PKG_CONFIG_VAPIGEN_VAPIGEN=${lib.getBin buildPackages.vala}/bin/vapigen"
61     "--enable-introspection=yes"
62     "--enable-vala=yes"
63   ];
65   passthru = {
66     updateScript = gnome.updateScript {
67       packageName = pname;
68       versionPolicy = "none";
69     };
70   };
72   meta = with lib; {
73     description = "A spell-checking library for GTK applications";
74     homepage = "https://wiki.gnome.org/Projects/gspell";
75     license = licenses.lgpl21Plus;
76     maintainers = teams.gnome.members;
77     platforms = platforms.unix;
78   };