mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
keylights: init at 0.1.0 (#532792)
This commit is contained in:
commit
07d149f0ed
2 changed files with 62 additions and 0 deletions
|
|
@ -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";
|
||||
|
|
|
|||
57
pkgs/by-name/ke/keylights/package.nix
Normal file
57
pkgs/by-name/ke/keylights/package.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue