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

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

94 lines
2.2 KiB
Nix
Raw Normal View History

2020-12-26 22:03:24 +00:00
{ lib
, stdenv
, fetchFromGitLab
, docbook-xsl-nons
, gobject-introspection
, gtk-doc
, libxslt
2020-12-26 22:03:24 +00:00
, meson
, ninja
, pkg-config
, vala
2020-12-26 22:03:24 +00:00
, wrapGAppsHook
, glib
, gsound
, json-glib
, libgudev
, dbus
2020-12-26 22:03:24 +00:00
}:
2021-09-12 02:44:44 +00:00
let
themes = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = "feedbackd-device-themes";
rev = "v0.0.20220523";
sha256 = "sha256-RyUZj+tpJSYhyoK+E98CTIoHwXwBdB1YHVnO5821exo=";
2021-09-12 02:44:44 +00:00
};
in
2020-12-26 22:03:24 +00:00
stdenv.mkDerivation rec {
pname = "feedbackd";
# Not an actual upstream project release,
# only a Debian package release that is tagged in the upstream repo
2022-11-11 21:44:19 +00:00
version = "0.0.1";
outputs = [ "out" "dev" ]
# remove if cross-compiling gobject-introspection works
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
2020-12-26 22:03:24 +00:00
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = "feedbackd";
rev = "v${version}";
2022-11-11 21:44:19 +00:00
hash = "sha256-l1FhECLPq8K9lzQ50sI/aH7fwR9xW1ATyk7EWRmLzuQ=";
2020-12-26 22:03:24 +00:00
};
nativeBuildInputs = [
docbook-xsl-nons
gobject-introspection
gtk-doc
libxslt
2020-12-26 22:03:24 +00:00
meson
ninja
pkg-config
vala
wrapGAppsHook
2020-12-26 22:03:24 +00:00
];
buildInputs = [
glib
gsound
json-glib
libgudev
2020-12-26 22:03:24 +00:00
];
mesonFlags = [
"-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
"-Dman=true"
# TODO(mindavi): introspection broken due to https://github.com/NixOS/nixpkgs/issues/72868
# can be removed if cross-compiling gobject-introspection works.
"-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
];
nativeCheckInputs = [
dbus
];
doCheck = true;
2021-05-01 06:03:42 +00: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 02:44:44 +00:00
cp ${themes}/data/* $out/share/feedbackd/themes/
2021-05-01 06:03:42 +00:00
'';
2020-12-26 22:03:24 +00: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;
maintainers = with maintainers; [ pacman99 tomfitzhenry ];
2020-12-26 22:03:24 +00:00
platforms = platforms.linux;
};
}