Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keylight-cli: init at 1.0.0 #371935

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23915,6 +23915,12 @@
githubId = 245573;
name = "Dmitry Kalinkin";
};
versality = {
email = "[email protected]";
github = "versality";
githubId = 1486626;
name = "Artyom Pertsovsky";
};
vglfr = {
email = "[email protected]";
github = "vglfr";
Expand Down
34 changes: 34 additions & 0 deletions pkgs/by-name/ke/keylight-cli/package.nix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also the passthru.updateScript = nix-update-script { }, see the wiki article on it. I can't vouch for it as I haven't yet used it, only requested to use it on a PR of mine 😅

I don't think this is really a requirement, though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also the passthru.updateScript = nix-update-script { }, see the wiki article on it. I can't vouch for it as I haven't yet used it, only requested to use it on a PR of mine 😅

I don't think this is really a requirement, though.

Thanks for mentioning the updateScript! Since this is the initial package submission, I'd prefer to keep it simple for now. I can look into adding the update script in a future PR once the basic package is merged.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
babashka,
}:

stdenv.mkDerivation rec {
pname = "keylight-cli";
version = "1.0.0";

src = fetchFromGitHub {
owner = "versality";
repo = "keylight-cli";
rev = "46ff8472f9544e16eea822bf274acf4a5cbedbe8";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realised that the rev field in fetchFromGithub can be a git tag, like "v${version}", in this case.

Copy link
Author

@versality versality Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realised that the rev field in fetchFromGithub can be a git tag, like "v${version}", in this case.

Thanks for the suggestion! The upstream repo doesn't use tags yet, but I'll consider adding them in the future. For now, the git hash should work fine for pinning the version.

sha256 = "sha256-gzTvMBa7JVckxLnltlR5XOj6BBbfPXZei7Wj3f1n4Kw=";
};

propagatedBuildInputs = [ babashka ];

installPhase = ''
mkdir -p $out/bin
install -Dm755 keylight.bb $out/bin/keylight
'';

meta = with lib; {
description = "CLI tool to control Elgato Key Light devices";
homepage = "https://github.com/versality/keylight-cli";
license = licenses.gpl2Only;
maintainers = with maintainers; [ versality ];
mainProgram = "keylight";
platforms = platforms.all;
};
}