2021-12-14 15:06:13 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, rustPlatform
|
|
|
|
, vulkan-loader
|
2023-04-16 08:50:45 +00:00
|
|
|
, wayland
|
2022-01-15 03:28:51 +00:00
|
|
|
, pkg-config
|
|
|
|
, udev
|
|
|
|
, v4l-utils
|
2021-12-14 15:06:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wluma";
|
2023-10-26 15:36:01 +00:00
|
|
|
version = "4.3.0";
|
2021-12-14 15:06:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maximbaz";
|
|
|
|
repo = "wluma";
|
|
|
|
rev = version;
|
2023-10-26 15:36:01 +00:00
|
|
|
sha256 = "sha256-FaX87k8LdBhrBX4qvokSHkcNaQZ0+oSbkn9d0dK6FGo=";
|
2021-12-14 15:06:13 +00:00
|
|
|
};
|
|
|
|
|
2023-03-25 23:16:46 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-04-16 08:50:45 +00:00
|
|
|
"toml-0.5.9" = "sha256-WUQFF9Hfo3JK65AKAF7qNZex6l7F3N8HXmJlu8cJUEE=";
|
2023-03-25 23:16:46 +00:00
|
|
|
};
|
|
|
|
};
|
2022-07-08 14:44:08 +00:00
|
|
|
|
2022-01-15 03:28:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
2022-02-13 12:00:00 +00:00
|
|
|
rustPlatform.bindgenHook
|
2022-01-15 03:28:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
udev
|
2022-02-13 12:00:00 +00:00
|
|
|
v4l-utils
|
2023-04-16 08:50:45 +00:00
|
|
|
vulkan-loader
|
2022-01-15 03:28:51 +00:00
|
|
|
];
|
|
|
|
|
2021-12-14 15:06:13 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/wluma \
|
2023-04-16 08:50:45 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ wayland ]}"
|
2021-12-14 15:06:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatic brightness adjustment based on screen contents and ALS";
|
|
|
|
homepage = "https://github.com/maximbaz/wluma";
|
2023-04-16 08:50:45 +00:00
|
|
|
changelog = "https://github.com/maximbaz/wluma/releases/tag/${version}";
|
2021-12-14 15:06:13 +00:00
|
|
|
license = licenses.isc;
|
2022-02-01 20:50:15 +00:00
|
|
|
maintainers = with maintainers; [ yshym jmc-figueira ];
|
2021-12-14 15:06:13 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|