From 00562b5a9a7fa169c8f0f825ef71bab29a0a279f Mon Sep 17 00:00:00 2001 From: Taha Date: Wed, 11 Jul 2018 00:15:52 -0400 Subject: triggerhappy: init at 0.5.0 --- pkgs/tools/inputmethods/triggerhappy/default.nix | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/tools/inputmethods/triggerhappy/default.nix (limited to 'pkgs/tools/inputmethods') diff --git a/pkgs/tools/inputmethods/triggerhappy/default.nix b/pkgs/tools/inputmethods/triggerhappy/default.nix new file mode 100644 index 000000000000..719d86b3a389 --- /dev/null +++ b/pkgs/tools/inputmethods/triggerhappy/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + name = "triggerhappy-${version}"; + version = "0.5.0"; + + src = fetchurl { + url = "https://github.com/wertarbyte/triggerhappy/archive/release/${version}.tar.gz"; + sha256 = "af0fc196202f2d35153be401769a9ad9107b5b6387146cfa8895ae9cafad631c"; + }; + + buildInputs = [ perl ]; + installFlags = [ "DESTDIR=$(out)" ]; + + postPatch = '' + substituteInPlace Makefile --replace "/usr/" "/" + substituteInPlace Makefile --replace "/sbin/" "/bin/" + ''; + + postInstall = '' + install -D -m 644 -t "$out/etc/triggerhappy/triggers.d" "triggerhappy.conf.examples" + install -D -m 644 -t "$out/usr/lib/systemd/system" "systemd/triggerhappy.service" "systemd/triggerhappy.socket" + install -D -m 644 -t "$out/usr/lib/udev/rules.d" "udev/triggerhappy-udev.rules" + ''; + + meta = with stdenv.lib; { + description = "A lightweight hotkey daemon"; + longDescription = '' + Triggerhappy is a hotkey daemon developed with small and embedded systems in + mind, e.g. linux based routers. It attaches to the input device files and + interprets the event data received and executes scripts configured in its + configuration. + ''; + homepage = https://github.com/wertarbyte/triggerhappy/; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = [ maintainers.taha ]; + }; +} -- cgit 1.4.1