about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/seatd/default.nix
blob: 7cc2c967fe01993f3100d04b068cf45354945c97 (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
{ fetchFromSourcehut
, lib
, meson
, ninja
, pkg-config
, scdoc
, stdenv
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "seatd";
  version = "0.8.0";

  src = fetchFromSourcehut {
    owner = "~kennylevinsen";
    repo = "seatd";
    rev = finalAttrs.version;
    hash = "sha256-YaR4VuY+wrzbnhER4bkwdm0rTY1OVMtixdDEhu7Lnws=";
  };

  outputs = [ "bin" "out" "dev" "man" ];

  depsBuildBuild = [
    pkg-config
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    scdoc
  ];

  buildInputs = lib.optionals systemdSupport [ systemd ];

  mesonFlags = [
    "-Dlibseat-logind=${if systemdSupport then "systemd" else "disabled"}"
    "-Dlibseat-builtin=enabled"
    "-Dserver=enabled"
  ];

  meta = {
    description = "A universal seat management library";
    changelog = "https://git.sr.ht/~kennylevinsen/seatd/refs/${finalAttrs.version}";
    homepage = "https://sr.ht/~kennylevinsen/seatd/";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ emantor ];
    platforms = with lib.platforms; freebsd ++ linux ++ netbsd;
    mainProgram = "seatd";
  };
})