about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/wayfire/firedecor.nix
blob: ce42f6fc688660f210087deef678af057b96b37c (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
{ stdenv
, lib
, fetchFromGitHub
, meson
, ninja
, pkg-config
, boost
, cairo
, glib
, libGL
, libinput
, librsvg
, libxkbcommon
, pango
, udev
, wayfire
, wayland
, wf-config
, xcbutilwm
, mate
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "firedecor";
  version = "2023-10-23";

  src = fetchFromGitHub {
    owner = "mntmn";
    repo = "Firedecor";
    rev = finalAttrs.version;
    hash = "sha256-7or8HkmIZnLpXEZzUhJ3u8SIPfIQFgn32Ju/5OzK06Y=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    boost
    cairo
    glib
    libGL
    libinput
    librsvg
    libxkbcommon
    pango
    udev
    wayfire
    wayland
    wf-config
    xcbutilwm
  ];

  postPatch = ''
    substituteInPlace src/firedecor-theme.cpp \
      --replace-fail "/usr/share" "/run/current-system/sw/share"
  '';

  env = {
    PKG_CONFIG_WAYFIRE_PLUGINDIR = "${placeholder "out"}/lib/wayfire";
    PKG_CONFIG_WAYFIRE_METADATADIR = "${placeholder "out"}/share/wayfire/metadata";
  };

  meta = with lib; {
    homepage = "https://github.com/mntmn/Firedecor";
    description = "Advanced window decoration plugin for the Wayfire window manager";
    license = licenses.mit;
    inherit (mate.mate-wayland-session.meta) maintainers;
    inherit (wayfire.meta) platforms;
  };
})