summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libratbag/default.nix
blob: 271dc156695adf0bb69515455f0d07eaa9280c6a (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
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
, glib, systemd, udev, libevdev, gitMinimal, check, valgrind, swig, python3 }:

stdenv.mkDerivation rec {
  name = "libratbag-${version}";
  version = "0.9.903";

  src = fetchFromGitHub {
    owner  = "libratbag";
    repo   = "libratbag";
    rev    = "v${version}";
    sha256 = "0cr5skrb7a5mgj7dkm647ib8336hb88bf11blaf6xldafi8b0jlj";
  };


  # todo: python should be in buildInputs, but right now meson propagates
  # its own python. see: https://github.com/NixOS/nixpkgs/pull/46020
  nativeBuildInputs = [
    (python3.withPackages (ps: with ps; [ evdev pygobject3 ]))
    meson ninja pkgconfig gitMinimal swig check valgrind
  ];

  buildInputs = [ glib systemd udev libevdev ];

  mesonFlags = [
    "-Dsystemd-unit-dir=./lib/systemd/system/"
  ];

  meta = with stdenv.lib; {
    description = "Configuration library for gaming mice";
    homepage    = https://github.com/libratbag/libratbag;
    license     = licenses.mit;
    maintainers = with maintainers; [ mvnetbiz ];
    platforms   = platforms.linux;
  };
}