diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-10-08 14:42:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 14:42:59 -0500 |
commit | dd6f6951cf57050aa1efdd6296e838866c915c38 (patch) | |
tree | 243df8f9dd79e3253210675290319738c2ec959a /pkgs/tools/inputmethods | |
parent | 3cb179a4d0dffffb9e131acfb4f64baaed7f7a7a (diff) | |
parent | f9129251ea633ccf94ba4699a3ce5694c2e0c3b9 (diff) | |
download | nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar.gz nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar.bz2 nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar.lz nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar.xz nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.tar.zst nixlib-dd6f6951cf57050aa1efdd6296e838866c915c38.zip |
Merge pull request #45109 from jfrankenau/module-triggerhappy
nixos/triggerhappy: add module for triggerhappy hotkey daemon
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r-- | pkgs/tools/inputmethods/triggerhappy/default.nix | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/pkgs/tools/inputmethods/triggerhappy/default.nix b/pkgs/tools/inputmethods/triggerhappy/default.nix index 719d86b3a389..ec8ac8845597 100644 --- a/pkgs/tools/inputmethods/triggerhappy/default.nix +++ b/pkgs/tools/inputmethods/triggerhappy/default.nix @@ -1,26 +1,23 @@ -{ stdenv, fetchurl, perl }: +{ stdenv, fetchFromGitHub, pkgconfig, perl, systemd }: 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"; + src = fetchFromGitHub { + owner = "wertarbyte"; + repo = "triggerhappy"; + rev = "release/${version}"; + sha256 = "0gb1qhrxwq7i5abd408d01a2dpf28nr1fph1fg7w7n0i5i1nnk90"; }; - buildInputs = [ perl ]; - installFlags = [ "DESTDIR=$(out)" ]; + nativeBuildInputs = [ pkgconfig perl ]; + buildInputs = [ systemd ]; - postPatch = '' - substituteInPlace Makefile --replace "/usr/" "/" - substituteInPlace Makefile --replace "/sbin/" "/bin/" - ''; + makeFlags = [ "PREFIX=$(out)" "BINDIR=$(out)/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; { @@ -34,6 +31,6 @@ stdenv.mkDerivation rec { homepage = https://github.com/wertarbyte/triggerhappy/; license = licenses.gpl3Plus; platforms = platforms.linux; - maintainers = [ maintainers.taha ]; + maintainers = with maintainers; [ jfrankenau taha ]; }; } |