summary refs log tree commit diff
path: root/pkgs/os-specific/linux/input-utils/default.nix
blob: 0fc2130d102a812ec5211502d892093c1b0fcbcf (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
{ stdenv, fetchurl, linuxHeaders }:

stdenv.mkDerivation rec {
  pname = "input-utils";
  version = "1.3";
  
  src = fetchurl {
    url = "https://www.kraxel.org/releases/input/input-${version}.tar.gz";
    sha256 = "11w0pp20knx6qpgzmawdbk1nj2z3fzp8yd6nag6s8bcga16w6hli";
  };

  prePatch = ''
    # Use proper include path for kernel include files.
    substituteInPlace ./name.sh --replace "/usr/include/linux/" "${linuxHeaders}/include/linux/"
    substituteInPlace ./lirc.sh --replace "/usr/include/linux/" "${linuxHeaders}/include/linux/"
  '';

  makeFlags = [
    "prefix=$(out)"
    "STRIP="
  ];

  meta = with stdenv.lib; {
    description = "Input layer utilities, includes lsinput";
    homepage    = "https://www.kraxel.org/blog/linux/input/";
    license     = licenses.gpl2;
    maintainers = with maintainers; [ samueldr ];
    platforms   = platforms.linux;
  };
}