2022-07-13 15:05:29 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "keyd";
|
2022-07-31 18:39:38 +02:00
|
|
|
version = "2.4.2";
|
2022-07-13 15:05:29 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rvaiya";
|
|
|
|
repo = "keyd";
|
|
|
|
rev = "v" + version;
|
2022-07-31 18:39:38 +02:00
|
|
|
hash = "sha256-QWr+xog16MmybhQlEWbskYa/dypb9Ld54MOdobTbyMo=";
|
2022-07-13 15:05:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace DESTDIR= DESTDIR=${placeholder "out"} \
|
|
|
|
--replace /usr "" \
|
|
|
|
--replace /var/log/keyd.log /var/log/keyd/keyd.log
|
|
|
|
|
|
|
|
substituteInPlace keyd.service \
|
|
|
|
--replace /usr/bin $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ systemd ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/etc
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-07-13 15:09:58 +02:00
|
|
|
description = "A key remapping daemon for linux.";
|
|
|
|
license = licenses.mit;
|
2022-07-13 15:05:29 +02:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2022-07-13 15:09:58 +02:00
|
|
|
platforms = platforms.linux;
|
2022-07-13 15:05:29 +02:00
|
|
|
};
|
|
|
|
}
|