2022-01-03 16:56:52 +00:00
|
|
|
{ lib
|
2022-01-19 23:45:15 +00:00
|
|
|
, stdenv
|
2022-01-03 16:56:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, rustPlatform
|
|
|
|
, vulkan-loader
|
2022-01-19 23:45:15 +00:00
|
|
|
, pkg-config
|
|
|
|
, udev
|
|
|
|
, v4l-utils
|
|
|
|
, llvmPackages
|
2022-01-03 16:56:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wluma";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "4.1.2";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maximbaz";
|
|
|
|
repo = "wluma";
|
|
|
|
rev = version;
|
2022-01-25 03:21:06 +00:00
|
|
|
sha256 = "sha256-kUYh4RmD4zRI3ZNZWl2oWcO0Ze5czLBXUgPMl/cLW/I=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"toml-0.5.8" = "sha256-aOq5ERYXP329k1d6z8AS987KlFRRcPZhMHOzxnSRXZg=";
|
|
|
|
};
|
|
|
|
};
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
2022-03-05 16:20:37 +00:00
|
|
|
rustPlatform.bindgenHook
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
udev
|
2022-03-05 16:20:37 +00:00
|
|
|
v4l-utils
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/wluma \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ vulkan-loader ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatic brightness adjustment based on screen contents and ALS";
|
|
|
|
homepage = "https://github.com/maximbaz/wluma";
|
|
|
|
license = licenses.isc;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ yshym jmc-figueira ];
|
2022-01-03 16:56:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|