about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/gnome/core/gnome-dictionary/default.nix
blob: d5dfce9f7ed0fab11f318144b1ec63cedfd065be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{ stdenv
, lib
, fetchurl
, fetchpatch
, meson
, ninja
, pkg-config
, desktop-file-utils
, appstream-glib
, libxslt
, libxml2
, gettext
, itstool
, wrapGAppsHook
, docbook_xsl
, docbook_xml_dtd_43
, gnome
, gtk3
, glib
, gsettings-desktop-schemas
}:

stdenv.mkDerivation rec {
  pname = "gnome-dictionary";
  version = "40.0";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-dictionary/${lib.versions.major version}/${pname}-${version}.tar.xz";
    sha256 = "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f";
  };

  patches = [
    # Fix test dependencies with meson 0.57, can be removed on next bump
    # We need to explicitly depend on the generated files.
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/gnome-dictionary/-/commit/87c026cfe4acbcfc62d15950f88a71d8d9678c7e.patch";
      sha256 = "tKesWeOK3OqOxrXm4dZvCZHHdTD7AQbYDjtYDCsLd3A=";
    })
    # Fix build with meson 0.61, can be removed on next bump
    # data/appdata/meson.build:3:5: ERROR: Function does not take positional arguments.
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/gnome-dictionary/-/commit/cf3f8a67cd6f3059c555ed9cf0f5fba10abb7f68.patch";
      sha256 = "cIRM6ACqsnEo2JWYvr6EBye5o0BudugZMShCe1U5hz8=";
    })
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    wrapGAppsHook
    libxml2
    gettext
    itstool
    desktop-file-utils
    appstream-glib
    libxslt
    docbook_xsl
    docbook_xml_dtd_43
  ];

  buildInputs = [
    gtk3
    glib
    gsettings-desktop-schemas
    gnome.adwaita-icon-theme
  ];

  doCheck = true;

  passthru = {
    updateScript = gnome.updateScript {
      packageName = "gnome-dictionary";
      attrPath = "gnome.gnome-dictionary";
    };
  };

  meta = with lib; {
    homepage = "https://wiki.gnome.org/Apps/Dictionary";
    description = "Dictionary is the GNOME application to look up definitions";
    mainProgram = "gnome-dictionary";
    maintainers = teams.gnome.members;
    license = licenses.gpl2;
    platforms = platforms.unix;
  };
}