From 83bac3d9740629b2c3dccca10dffb0e9156ff9a3 Mon Sep 17 00:00:00 2001 From: Vladyslav M Date: Wed, 28 Aug 2019 11:44:57 +0300 Subject: [PATCH] kanshi: 2019-02-02 -> 1.0.0 --- pkgs/tools/misc/kanshi/default.nix | 47 +++++++++++++----------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/pkgs/tools/misc/kanshi/default.nix b/pkgs/tools/misc/kanshi/default.nix index dac3b0c2c32..d3e0ba029f3 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 ]; + nativeBuildInputs = [ meson ninja pkgconfig scdoc ]; + buildInputs = [ wayland ]; - cargoSha256 = "0pvkrdjrg9y38vsrqkrvsknzp78sknpmq14rskvij450a9mpihii"; - - 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; }; }