about summary refs log tree commit diff
path: root/pkgs/tools/misc/blink1-tool/default.nix
blob: fc82d8244970f39dd3fc71e699a6ec03e6639920 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, stdenv, fetchFromGitHub, libusb1, pkg-config, ... }:

stdenv.mkDerivation rec {
  pname = "blink1";
  version = "1.98a";

  src = fetchFromGitHub {
    owner = "todbot";
    repo = "blink1";
    rev = "v${version}";
    sha256 = "sha256-o4pOF6Gp70AL63ih6BNOpRTCs7+qzeZrEqaR4hYDTG8=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ libusb1 ];

  configurePhase = ''
    cd commandline
  '';

  installPhase = ''
    PREFIX=$out make install
  '';

  meta = {
    description = "Command line client for the blink(1) notification light";
    homepage = "https://blink1.thingm.com/";
    license = lib.licenses.cc-by-sa-30;
    maintainers = [ lib.maintainers.cransom ];
    platforms = lib.platforms.linux;
  };
}