2020-12-26 23:03:24 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
2021-05-09 17:16:33 +02:00
|
|
|
, docbook-xsl-nons
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, libxslt
|
2020-12-26 23:03:24 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2021-05-09 17:16:33 +02:00
|
|
|
, vala
|
2020-12-26 23:03:24 +01:00
|
|
|
, wrapGAppsHook
|
|
|
|
, glib
|
|
|
|
, gsound
|
|
|
|
, json-glib
|
2021-05-09 17:16:33 +02:00
|
|
|
, libgudev
|
|
|
|
, dbus
|
2020-12-26 23:03:24 +01:00
|
|
|
}:
|
|
|
|
|
2021-09-12 04:44:44 +02:00
|
|
|
let
|
|
|
|
themes = fetchFromGitLab {
|
|
|
|
domain = "source.puri.sm";
|
|
|
|
owner = "Librem5";
|
|
|
|
repo = "feedbackd-device-themes";
|
|
|
|
rev = "v0.0.20210909";
|
|
|
|
sha256 = "1d041wnq39sa0sl08xya4yp3n7j6aw560i38chl10vgpmwk9mmhr";
|
|
|
|
};
|
|
|
|
in
|
2020-12-26 23:03:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-05-09 17:16:33 +02:00
|
|
|
pname = "feedbackd";
|
|
|
|
# Not an actual upstream project release,
|
|
|
|
# only a Debian package release that is tagged in the upstream repo
|
2022-02-08 08:43:24 +01:00
|
|
|
version = "0.0.0+git20211018";
|
2021-05-09 17:16:33 +02:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2020-12-26 23:03:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "source.puri.sm";
|
|
|
|
owner = "Librem5";
|
|
|
|
repo = "feedbackd";
|
2021-05-09 17:16:33 +02:00
|
|
|
rev = "v${version}";
|
2022-02-08 08:43:24 +01:00
|
|
|
hash = "sha256-jqKRHcxISK54xq/tQm6zV+J+U71eKh04OVTNHDDy65E=";
|
2020-12-26 23:03:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-05-09 17:16:33 +02:00
|
|
|
docbook-xsl-nons
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
libxslt
|
2020-12-26 23:03:24 +01:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
vala
|
2021-05-09 17:16:33 +02:00
|
|
|
wrapGAppsHook
|
2020-12-26 23:03:24 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gsound
|
|
|
|
json-glib
|
2021-05-09 17:16:33 +02:00
|
|
|
libgudev
|
2020-12-26 23:03:24 +01:00
|
|
|
];
|
|
|
|
|
2021-05-09 17:16:33 +02:00
|
|
|
mesonFlags = [ "-Dgtk_doc=true" "-Dman=true" ];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dbus
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-05-01 08:03:42 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/udev/rules.d
|
|
|
|
sed "s|/usr/libexec/|$out/libexec/|" < $src/debian/feedbackd.udev > $out/lib/udev/rules.d/90-feedbackd.rules
|
2021-09-12 04:44:44 +02:00
|
|
|
cp ${themes}/data/* $out/share/feedbackd/themes/
|
2021-05-01 08:03:42 +02:00
|
|
|
'';
|
|
|
|
|
2020-12-26 23:03:24 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A daemon to provide haptic (and later more) feedback on events";
|
|
|
|
homepage = "https://source.puri.sm/Librem5/feedbackd";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-02-13 03:03:18 +01:00
|
|
|
maintainers = with maintainers; [ pacman99 tomfitzhenry ];
|
2020-12-26 23:03:24 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|