about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/keyleds/default.nix
blob: c48b30b34dc90d986532d3a504315effbef0a78b (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, libuv
, libX11
, libXi
, libyaml
, luajit
, udev
}:

stdenv.mkDerivation rec {
  pname = "keyleds";
  version = "unstable-2021-04-08";

  src = fetchFromGitHub {
    owner = "keyleds";
    repo = pname;
    rev = "171361654a64b570d747c2d196acb2da4b8dc293";
    sha256 = "sha256-mojgHMT0gni0Po0hiZqQ8eMzqfwUipXue1uqpionihw=";
  };

  # This commit corresponds to the following open PR:
  # https://github.com/keyleds/keyleds/pull/74
  # According to the author of the PR, the maintainer of keyleds is unreachable.
  # This patch fixes the build process which is broken on the current master branch of keyleds.
  patches = [
    (fetchpatch {
      url = "https://github.com/keyleds/keyleds/commit/bffed5eb181127df915002b6ed830f85f15feafd.patch";
      sha256 = "sha256-i2N3D/K++34JVqJloNK2UcN473NarIjdjAz6PUhXcNY=";
    })
  ];

  strictDeps = true;

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    libuv
    libX11
    libXi
    libyaml
    luajit
    udev
  ];

  enableParallelBuilding = true;

  cmakeFlags = [
    "-DCMAKE_BUILD_TYPE=MinSizeRel"
  ];

  meta = {
    homepage = "https://github.com/keyleds/keyleds";
    description = "Advanced RGB animation service for Logitech keyboards";
    license = lib.licenses.gpl3;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}