summary refs log tree commit diff
path: root/pkgs/tools/wayland/wlogout/default.nix
blob: d9d4421260106983824cb71703d26eb41dc9ab4e (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
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, meson
, ninja
, scdoc
, gtk3
, libxkbcommon
, wayland
, wayland-protocols
, gtk-layer-shell
}:

stdenv.mkDerivation rec {
  pname = "wlogout";
  version = "1.1.1";

  src = fetchFromGitHub {
    owner = "ArtsyMacaw";
    repo = "wlogout";
    rev = version;
    sha256 = "cTscfx+erHVFHwwYpN7pADQWt5sq75sQSyXSP/H8kOs=";
  };

  nativeBuildInputs = [ pkg-config meson ninja scdoc ];
  buildInputs = [
    gtk3
    libxkbcommon
    wayland
    wayland-protocols
    gtk-layer-shell
  ];

  postPatch = ''
    substituteInPlace style.css \
      --replace "/usr/share/wlogout" "$out/share/${pname}"

    substituteInPlace main.c \
      --replace "/etc/wlogout" "$out/etc/${pname}"
  '';

  mesonFlags = [
    "--datadir=${placeholder "out"}/share"
    "--sysconfdir=${placeholder "out"}/etc"
  ];

  meta = with lib; {
    homepage = "https://github.com/ArtsyMacaw/wlogout";
    description = "A wayland based logout menu";
    license = licenses.mit;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.unix;
  };
}
# TODO: shell completions