1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 babashka,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "keylight-cli";
10 version = "1.0.0";
11
12 src = fetchFromGitHub {
13 owner = "versality";
14 repo = "keylight-cli";
15 tag = "v${version}";
16 hash = "sha256-boL6Sg+C9OxMEcr5tAFCn8NxCDrJ6I2nMn9/2yMOYRI=";
17 };
18
19 buildInputs = [ babashka ];
20
21 installPhase = ''
22 runHook preInstall
23
24 mkdir -p $out/bin
25 install -Dm755 keylight.bb $out/bin/keylight
26
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "CLI tool to control Elgato Key Light devices";
32 homepage = "https://github.com/versality/keylight-cli";
33 license = licenses.gpl2Only;
34 maintainers = with maintainers; [ versality ];
35 mainProgram = "keylight";
36 platforms = platforms.all;
37 };
38}