1{ lib, stdenv, fetchurl, linuxHeaders }:
2
3stdenv.mkDerivation rec {
4 pname = "input-utils";
5 version = "1.3";
6
7 src = fetchurl {
8 url = "https://www.kraxel.org/releases/input/input-${version}.tar.gz";
9 sha256 = "11w0pp20knx6qpgzmawdbk1nj2z3fzp8yd6nag6s8bcga16w6hli";
10 };
11
12 prePatch = ''
13 # Use proper include path for kernel include files.
14 substituteInPlace ./name.sh --replace "/usr/include/linux/" "${linuxHeaders}/include/linux/"
15 substituteInPlace ./lirc.sh --replace "/usr/include/linux/" "${linuxHeaders}/include/linux/"
16 '';
17
18 makeFlags = [
19 "prefix=$(out)"
20 "STRIP="
21 ];
22
23 meta = with lib; {
24 description = "Input layer utilities, includes lsinput";
25 homepage = "https://www.kraxel.org/blog/linux/input/";
26 license = licenses.gpl2;
27 maintainers = with maintainers; [ samueldr ];
28 platforms = platforms.linux;
29 };
30}