1{
2 stdenv,
3 lib,
4 mkXfceDerivation,
5 fetchpatch,
6 python3,
7 cairo,
8 exo,
9 garcon,
10 gtk-layer-shell,
11 gtk3,
12 libdbusmenu-gtk3,
13 libwnck,
14 libxfce4ui,
15 libxfce4util,
16 libxfce4windowing,
17 tzdata,
18 wayland,
19 xfconf,
20 withIntrospection ?
21 lib.meta.availableOn stdenv.hostPlatform gobject-introspection
22 && stdenv.hostPlatform.emulatorAvailable buildPackages,
23 buildPackages,
24 gobject-introspection,
25 vala,
26}:
27
28mkXfceDerivation {
29 category = "xfce";
30 pname = "xfce4-panel";
31 version = "4.20.4";
32
33 sha256 = "sha256-P1EZefpGRZ0DQ5S4Okw9pyly23d+UdPp5xMj1wJc44c=";
34
35 patches = [
36 # Fixes panel not shown on external display after reconnecting
37 # https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/925
38 (fetchpatch {
39 url = "https://gitlab.xfce.org/xfce/xfce4-panel/-/commit/e2451cacd950f4b7539efd1e5e36b067515dba9b.patch";
40 hash = "sha256-h2iPlghHJeHD9PJp6RJrRx4MBsaqXuNclAJW6CKHE4A=";
41 })
42 ];
43
44 nativeBuildInputs = [
45 python3
46 ]
47 ++ lib.optionals withIntrospection [
48 gobject-introspection
49 vala # vala bindings require GObject introspection
50 ];
51
52 buildInputs = [
53 cairo
54 exo
55 garcon
56 gtk-layer-shell
57 libdbusmenu-gtk3
58 libxfce4ui
59 libxfce4windowing
60 libwnck
61 tzdata
62 wayland
63 xfconf
64 ];
65
66 propagatedBuildInputs = [
67 gtk3
68 libxfce4util
69 ];
70
71 postPatch = ''
72 patchShebangs xdt-gen-visibility
73
74 substituteInPlace plugins/clock/clock.c \
75 --replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
76 '';
77
78 meta = with lib; {
79 description = "Panel for the Xfce desktop environment";
80 teams = [ teams.xfce ];
81 };
82}