triggerhappy: build with systemd socket support
This commit is contained in:
parent
6e7b11dbb6
commit
58a2632148
@ -1,26 +1,23 @@
|
|||||||
{ stdenv, fetchurl, perl }:
|
{ stdenv, fetchFromGitHub, pkgconfig, perl, systemd }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "triggerhappy-${version}";
|
name = "triggerhappy-${version}";
|
||||||
version = "0.5.0";
|
version = "0.5.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/wertarbyte/triggerhappy/archive/release/${version}.tar.gz";
|
owner = "wertarbyte";
|
||||||
sha256 = "af0fc196202f2d35153be401769a9ad9107b5b6387146cfa8895ae9cafad631c";
|
repo = "triggerhappy";
|
||||||
|
rev = "release/${version}";
|
||||||
|
sha256 = "0gb1qhrxwq7i5abd408d01a2dpf28nr1fph1fg7w7n0i5i1nnk90";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl ];
|
nativeBuildInputs = [ pkgconfig perl ];
|
||||||
installFlags = [ "DESTDIR=$(out)" ];
|
buildInputs = [ systemd ];
|
||||||
|
|
||||||
postPatch = ''
|
makeFlags = [ "PREFIX=$(out)" "BINDIR=$(out)/bin" ];
|
||||||
substituteInPlace Makefile --replace "/usr/" "/"
|
|
||||||
substituteInPlace Makefile --replace "/sbin/" "/bin/"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -D -m 644 -t "$out/etc/triggerhappy/triggers.d" "triggerhappy.conf.examples"
|
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; {
|
meta = with stdenv.lib; {
|
||||||
@ -34,6 +31,6 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = https://github.com/wertarbyte/triggerhappy/;
|
homepage = https://github.com/wertarbyte/triggerhappy/;
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.taha ];
|
maintainers = with maintainers; [ jfrankenau taha ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user