depot/third_party/nixpkgs/pkgs/tools/wayland/wluma/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

55 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, makeWrapper
, rustPlatform
, vulkan-loader
, wayland
, pkg-config
, udev
, v4l-utils
}:
rustPlatform.buildRustPackage rec {
pname = "wluma";
version = "4.2.0";
src = fetchFromGitHub {
owner = "maximbaz";
repo = "wluma";
rev = version;
sha256 = "sha256-6qZlwjzBPDkr2YHzDYeKQOuoozV7rpl8dojqTTzInqg=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"toml-0.5.9" = "sha256-WUQFF9Hfo3JK65AKAF7qNZex6l7F3N8HXmJlu8cJUEE=";
};
};
nativeBuildInputs = [
makeWrapper
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
udev
v4l-utils
vulkan-loader
];
postInstall = ''
wrapProgram $out/bin/wluma \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wayland ]}"
'';
meta = with lib; {
description = "Automatic brightness adjustment based on screen contents and ALS";
homepage = "https://github.com/maximbaz/wluma";
changelog = "https://github.com/maximbaz/wluma/releases/tag/${version}";
license = licenses.isc;
maintainers = with maintainers; [ yshym jmc-figueira ];
platforms = platforms.linux;
};
}