keylights: init at 0.1.0 (#532792)

This commit is contained in:
Oleksii Filonenko 2026-07-01 17:53:14 +00:00 committed by GitHub
commit 07d149f0ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 62 additions and 0 deletions

View file

@ -30114,6 +30114,11 @@
githubId = 168610;
name = "Ricardo M. Correia";
};
wjohnsto = {
name = "Will Johnston";
github = "wjohnsto";
githubId = 785258;
};
wkral = {
email = "william.kral@gmail.com";
github = "wkral";

View file

@ -0,0 +1,57 @@
{
lib,
fetchFromCodeberg,
installShellFiles,
rustPlatform,
stdenv,
testers,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "keylights";
version = "0.1.0";
__structuredAttrs = true;
src = fetchFromCodeberg {
owner = "wjohnsto";
repo = "keylights";
rev = "v${finalAttrs.version}";
hash = "sha256-cl/IRkQMowrWOt0yLEFZC1J2MM6Fr68J6YaakUXwxTQ=";
};
cargoHash = "sha256-ns+EppqGP19P+xzevgZcovPKwYkMkWTcu5L0bovuQuk=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
keylightsBin="target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/keylights"
"$keylightsBin" completions bash > keylights.bash
"$keylightsBin" completions fish > keylights.fish
"$keylightsBin" completions zsh > _keylights
installShellCompletion --cmd keylights \
--bash keylights.bash \
--fish keylights.fish \
--zsh _keylights
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "keylights --version";
};
meta = {
description = "Daemonless CLI for discovering and controlling Elgato Key Light devices";
homepage = "https://codeberg.org/wjohnsto/keylights";
changelog = "https://codeberg.org/wjohnsto/keylights/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
mit
asl20
];
maintainers = with lib.maintainers; [ wjohnsto ];
mainProgram = "keylights";
platforms = lib.platforms.linux;
};
})