1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 meson,
6 ninja,
7 pkg-config,
8 boost,
9 glib,
10 libGL,
11 libinput,
12 librsvg,
13 libxkbcommon,
14 udev,
15 wayfire,
16 xcbutilwm,
17 mate,
18}:
19
20stdenv.mkDerivation (finalAttrs: {
21 pname = "firedecor";
22 version = "2023-10-23";
23
24 src = fetchFromGitHub {
25 owner = "mntmn";
26 repo = "Firedecor";
27 rev = finalAttrs.version;
28 hash = "sha256-7or8HkmIZnLpXEZzUhJ3u8SIPfIQFgn32Ju/5OzK06Y=";
29 };
30
31 nativeBuildInputs = [
32 meson
33 ninja
34 pkg-config
35 ];
36
37 buildInputs = [
38 boost
39 glib
40 libGL
41 libinput
42 librsvg
43 libxkbcommon
44 udev
45 wayfire
46 xcbutilwm
47 ];
48
49 postPatch = ''
50 substituteInPlace src/firedecor-theme.cpp \
51 --replace-fail "/usr/share" "/run/current-system/sw/share"
52 '';
53
54 env = {
55 PKG_CONFIG_WAYFIRE_PLUGINDIR = "${placeholder "out"}/lib/wayfire";
56 PKG_CONFIG_WAYFIRE_METADATADIR = "${placeholder "out"}/share/wayfire/metadata";
57 };
58
59 meta = with lib; {
60 homepage = "https://github.com/mntmn/Firedecor";
61 description = "Advanced window decoration plugin for the Wayfire window manager";
62 license = licenses.mit;
63 inherit (mate.mate-wayland-session.meta) teams;
64 inherit (wayfire.meta) platforms;
65 };
66})