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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
{
fetchFromGitHub,
glib,
gobject-introspection,
gtk3,
libgnomekbd,
gdk-pixbuf,
cairo,
xorg,
meson,
ninja,
pkg-config,
python3,
lib,
stdenv,
vala,
wrapGAppsHook3,
file,
inxi,
mate,
dbus,
libdbusmenu-gtk3,
}:
stdenv.mkDerivation rec {
pname = "xapp";
version = "2.8.12";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "linuxmint";
repo = "xapp";
rev = version;
hash = "sha256-LGONOsllf9POLLcRG2JN6VNvvMZorcG+aXVNLUz31Tc=";
};
# Recommended by upstream, which enables the build of xapp-debug.
# https://github.com/linuxmint/xapp/issues/169#issuecomment-1574962071
mesonBuildType = "debugoptimized";
nativeBuildInputs = [
meson
ninja
pkg-config
python3
vala
wrapGAppsHook3
gobject-introspection
];
buildInputs = [
(python3.withPackages (
ps: with ps; [
pygobject3
setproctitle # mate applet
]
))
libgnomekbd
gdk-pixbuf
xorg.libxkbfile
python3.pkgs.pygobject3 # for .pc file
mate.mate-panel # for gobject-introspection
dbus
libdbusmenu-gtk3
];
# Requires in xapp.pc
propagatedBuildInputs = [
gtk3
cairo
glib
];
mesonFlags = [
"-Dpy-overrides-dir=${placeholder "out"}/${python3.sitePackages}/gi/overrides"
];
postPatch = ''
chmod +x schemas/meson_install_schemas.py # patchShebangs requires executable file
patchShebangs schemas/meson_install_schemas.py
# Used in cinnamon-settings
substituteInPlace scripts/upload-system-info \
--replace-fail "'/usr/bin/pastebin'" "'$out/bin/pastebin'" \
--replace-fail "'inxi'" "'${inxi}/bin/inxi'"
# Used in x-d-p-xapp
substituteInPlace scripts/xfce4-set-wallpaper \
--replace-fail "file --mime-type" "${file}/bin/file --mime-type"
'';
# Fix gtk3 module target dir. Proper upstream solution should be using define_variable.
env.PKG_CONFIG_GTK__3_0_LIBDIR = "${placeholder "out"}/lib";
meta = with lib; {
homepage = "https://github.com/linuxmint/xapp";
description = "Cross-desktop libraries and common resources";
license = licenses.lgpl3;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}
|