2021-02-17 17:02:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-09-30 11:47:45 +00:00
|
|
|
, fetchFromSourcehut
|
2021-02-17 17:02:09 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, scdoc
|
|
|
|
, wayland
|
2022-05-18 14:49:53 +00:00
|
|
|
, wayland-scanner
|
2022-09-30 11:47:45 +00:00
|
|
|
, libvarlink
|
2024-05-15 15:35:15 +00:00
|
|
|
, libscfg
|
2021-02-17 17:02:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kanshi";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~emersion";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "kanshi";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
sha256 = "sha256-FDt+F5tWHLsMejlExb5yPh0SlWzuUlK9u54Uy+alrzw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
|
|
|
depsBuildBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ];
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs = [ wayland libvarlink libscfg ];
|
|
|
|
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
|
|
"-Wno-error=maybe-uninitialized"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-09-30 11:47:45 +00:00
|
|
|
homepage = "https://sr.ht/~emersion/kanshi";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Dynamic display configuration tool";
|
|
|
|
longDescription = ''
|
|
|
|
kanshi allows you to define output profiles that are automatically enabled
|
|
|
|
and disabled on hotplug. For instance, this can be used to turn a laptop's
|
|
|
|
internal screen off when docked.
|
|
|
|
|
|
|
|
kanshi can be used on Wayland compositors supporting the
|
|
|
|
wlr-output-management protocol.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "kanshi";
|
2022-09-30 11:47:45 +00:00
|
|
|
maintainers = with maintainers; [ balsoft danielbarter ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|