1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 gettext,
7 itstool,
8 glib,
9 gtk-layer-shell,
10 gtk3,
11 libxml2,
12 libgtop,
13 libcanberra-gtk3,
14 inkscape,
15 udisks2,
16 mate-desktop,
17 mate-panel,
18 hicolor-icon-theme,
19 wayland,
20 wrapGAppsHook3,
21 mateUpdateScript,
22}:
23
24stdenv.mkDerivation rec {
25 pname = "mate-utils";
26 version = "1.28.0";
27
28 src = fetchurl {
29 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
30 sha256 = "WESdeg0dkA/wO3jKn36Ywh6X9H/Ca+5/8cYYNPIviNM=";
31 };
32
33 nativeBuildInputs = [
34 pkg-config
35 gettext
36 itstool
37 inkscape
38 wrapGAppsHook3
39 ];
40
41 buildInputs = [
42 gtk-layer-shell
43 gtk3
44 libgtop
45 libcanberra-gtk3
46 libxml2
47 udisks2
48 mate-desktop
49 mate-panel
50 hicolor-icon-theme
51 wayland
52 ];
53
54 postPatch = ''
55 # Workaround undefined version requirements
56 # https://github.com/mate-desktop/mate-utils/issues/361
57 substituteInPlace configure \
58 --replace-fail '>= $GTK_LAYER_SHELL_REQUIRED_VERSION' "" \
59 --replace-fail '>= $GDK_WAYLAND_REQUIRED_VERSION' ""
60 '';
61
62 configureFlags = [ "--enable-wayland" ];
63
64 env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
65
66 enableParallelBuilding = true;
67
68 passthru.updateScript = mateUpdateScript { inherit pname; };
69
70 meta = with lib; {
71 description = "Utilities for the MATE desktop";
72 homepage = "https://mate-desktop.org";
73 license = with licenses; [
74 gpl2Plus
75 lgpl2Plus
76 ];
77 platforms = platforms.unix;
78 teams = [ teams.mate ];
79 };
80}