From a94f0afd3f28408402fde5db3dc9ad028390177c Mon Sep 17 00:00:00 2001 From: Yevhen Shymotiuk Date: Tue, 14 Dec 2021 17:06:13 +0200 Subject: [PATCH] wluma: init at 2.0.1 --- pkgs/tools/wayland/wluma/default.nix | 35 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/wayland/wluma/default.nix diff --git a/pkgs/tools/wayland/wluma/default.nix b/pkgs/tools/wayland/wluma/default.nix new file mode 100644 index 000000000000..2921e3858b41 --- /dev/null +++ b/pkgs/tools/wayland/wluma/default.nix @@ -0,0 +1,35 @@ +{ lib +, fetchFromGitHub +, makeWrapper +, rustPlatform +, vulkan-loader +}: + +rustPlatform.buildRustPackage rec { + pname = "wluma"; + version = "2.0.1"; + + src = fetchFromGitHub { + owner = "maximbaz"; + repo = "wluma"; + rev = version; + sha256 = "sha256-fqBEJS+SQoPNNEw6jyoiZjq/chY73bQ+cM21F8RdNPE="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + postInstall = '' + wrapProgram $out/bin/wluma \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}" + ''; + + cargoSha256 = "sha256-dZBA6VeJRHmqpazRwjLP1kYcYYN5LCFWkIaXqp4/RkQ="; + + meta = with lib; { + description = "Automatic brightness adjustment based on screen contents and ALS"; + homepage = "https://github.com/maximbaz/wluma"; + license = licenses.isc; + maintainers = with maintainers; [ yevhenshymotiuk ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad90577a7e54..23660cf4d120 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2601,6 +2601,8 @@ with pkgs; wlsunset = callPackage ../tools/wayland/wlsunset { }; + wluma = callPackage ../tools/wayland/wluma { }; + wob = callPackage ../tools/wayland/wob { }; wshowkeys = callPackage ../tools/wayland/wshowkeys { };