nixpkgs/pkgs/applications/misc/seatd/default.nix
2023-08-06 12:47:46 +00:00

45 lines
1.1 KiB
Nix

{ fetchFromSourcehut
, lib
, meson
, ninja
, pkg-config
, scdoc
, stdenv
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
}:
stdenv.mkDerivation rec {
pname = "seatd";
version = "0.8.0";
src = fetchFromSourcehut {
owner = "~kennylevinsen";
repo = "seatd";
rev = version;
sha256 = "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 = with lib; {
description = "A universal seat management library";
changelog = "https://git.sr.ht/~kennylevinsen/seatd/refs/${version}";
homepage = "https://sr.ht/~kennylevinsen/seatd/";
license = licenses.mit;
platforms = with platforms; freebsd ++ linux ++ netbsd;
maintainers = with maintainers; [ emantor ];
};
}