about summary refs log tree commit diff
path: root/pkgs/tools/misc/kanshi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/kanshi/default.nix')
-rw-r--r--pkgs/tools/misc/kanshi/default.nix47
1 files changed, 20 insertions, 27 deletions
diff --git a/pkgs/tools/misc/kanshi/default.nix b/pkgs/tools/misc/kanshi/default.nix
index dac3b0c2c32b6..d3e0ba029f3fa 100644
--- a/pkgs/tools/misc/kanshi/default.nix
+++ b/pkgs/tools/misc/kanshi/default.nix
@@ -1,40 +1,33 @@
-{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, udev }:
-rustPlatform.buildRustPackage 
-{
-  pname = "kanshi-unstable";
-  version = "2019-02-02";
+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, scdoc, wayland }:
+
+stdenv.mkDerivation rec {
+  pname = "kanshi";
+  version = "1.0.0";
 
   src = fetchFromGitHub {
     owner = "emersion";
     repo = "kanshi";
-    rev = "970267e400c21a6bb51a1c80a0aadfd1e6660a7b";
-    sha256 = "10lfdan86bmwazpma6ixnv46z9cnf879gxln8gx87v7a1x3ss0bh";
+    rev = "v${version}";
+    sha256 = "0v50q1s105c2rar6mi1pijm8llsnsp62gv4swd3ddjn5rwallg46";
   };
 
-  buildInputs = [ pkgconfig udev ];
-
-  cargoSha256 = "0pvkrdjrg9y38vsrqkrvsknzp78sknpmq14rskvij450a9mpihii";
+  nativeBuildInputs = [ meson ninja pkgconfig scdoc ];
+  buildInputs = [ wayland ];
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Dynamic display configuration tool";
-    longDescription = 
-    ''
-    Kanshi uses a configuration file and a list of available displays to choose 
-    the right settings for each display. It's useful if your window manager 
-    doesn't support multiple display configurations (e.g. i3/Sway).
-    
-    For now, it only supports:
-    - sysfs as backend
-    - udev as notifier (optional)
-    - Configuration file
-      - GNOME (~/.config/monitors.xml)
-      - Kanshi (see below)
-    - Sway as frontend
+    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.
     '';
     homepage = "https://github.com/emersion/kanshi";
     downloadPage = "https://github.com/emersion/kanshi";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.balsoft ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.mit;
+    maintainers = with maintainers; [ balsoft ];
+    platforms = platforms.linux;
   };
 }