summary refs log tree commit diff
diff options
context:
space:
mode:
authorTaha <lsdjkflfdskj@dlksjdljkfds.com>2018-07-11 00:15:52 -0400
committerTaha <lsdjkflfdskj@dlksjdljkfds.com>2018-07-11 00:15:52 -0400
commit00562b5a9a7fa169c8f0f825ef71bab29a0a279f (patch)
treee5d1715c12a9946ffcda897143ffc7cc6b300999
parent461ab720e59ca2e07b66b72069357bd2a0f9668b (diff)
downloadnixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar.gz
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar.bz2
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar.lz
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar.xz
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.tar.zst
nixpkgs-00562b5a9a7fa169c8f0f825ef71bab29a0a279f.zip
triggerhappy: init at 0.5.0
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--pkgs/tools/inputmethods/triggerhappy/default.nix39
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 46 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index bc227725a30..350db6478a7 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -3791,6 +3791,11 @@
     github = "Radvendii";
     name = "Taeer Bar-Yam";
   };
+  taha = {
+    email = "xrcrod@gmail.com";
+    github = "tgharib";
+    name = "Taha Gharib";
+  };
   tailhook = {
     email = "paul@colomiets.name";
     github = "tailhook";
diff --git a/pkgs/tools/inputmethods/triggerhappy/default.nix b/pkgs/tools/inputmethods/triggerhappy/default.nix
new file mode 100644
index 00000000000..719d86b3a38
--- /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 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2e8285db1aa..a3f358f5704 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5440,6 +5440,8 @@ with pkgs;
 
   trickle = callPackage ../tools/networking/trickle {};
 
+  triggerhappy = callPackage ../tools/inputmethods/triggerhappy {};
+
   trousers = callPackage ../tools/security/trousers { };
 
   tryton = callPackage ../applications/office/tryton { };