nixpkgs/pkgs/applications/misc/iptsd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.7 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, cmake
, meson
, ninja
, pkg-config
, cli11
, eigen
, hidrd
, inih
, microsoft-gsl
, spdlog
, systemd
}:
2021-05-27 17:48:59 +02:00
stdenv.mkDerivation rec {
pname = "iptsd";
version = "1.4.0";
2021-05-27 17:48:59 +02:00
src = fetchFromGitHub {
owner = "linux-surface";
repo = pname;
rev = "v${version}";
hash = "sha256-qBABt0qEePGrZH4khnikvStrSi/OVmP3yVMJZbEd36M=";
2021-05-27 17:48:59 +02:00
};
nativeBuildInputs = [
cmake
meson
ninja
pkg-config
];
dontUseCmakeConfigure = true;
2021-05-27 17:48:59 +02:00
buildInputs = [
cli11
eigen
hidrd
inih
microsoft-gsl
spdlog
systemd
];
2021-05-27 17:48:59 +02:00
# Original installs udev rules and service config into global paths
postPatch = ''
substituteInPlace etc/meson.build \
--replace "install_dir: unitdir" "install_dir: '$out/etc/systemd/system'" \
--replace "install_dir: rulesdir" "install_dir: '$out/etc/udev/rules.d'"
2023-10-19 19:16:53 +02:00
substituteInPlace etc/systemd/iptsd-find-service \
--replace "iptsd-find-hidraw" "$out/bin/iptsd-find-hidraw" \
--replace "systemd-escape" "${lib.getExe' systemd "systemd-escape"}"
substituteInPlace etc/udev/50-iptsd.rules.in \
2023-10-19 19:16:53 +02:00
--replace "/bin/systemd-escape" "${lib.getExe' systemd "systemd-escape"}"
2021-05-27 17:48:59 +02:00
'';
2021-05-27 17:48:59 +02:00
mesonFlags = [
"-Dservice_manager=systemd"
2021-05-27 17:48:59 +02:00
"-Dsample_config=false"
"-Ddebug_tools="
"-Db_lto=false" # plugin needed to handle lto object -> undefined reference to ...
2021-05-27 17:48:59 +02:00
];
meta = with lib; {
changelog = "https://github.com/linux-surface/iptsd/releases/tag/${src.rev}";
2021-05-27 17:48:59 +02:00
description = "Userspace daemon for Intel Precise Touch & Stylus";
homepage = "https://github.com/linux-surface/iptsd";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ tomberek dotlambda ];
2021-05-27 17:48:59 +02:00
platforms = platforms.linux;
};
}