forked from mirrors/nixpkgs
Merge pull request #206634 from tomfitzhenry/feedbackd-0.0.2
This commit is contained in:
commit
5ea2a68929
|
@ -2,6 +2,8 @@
|
|||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, docbook-xsl-nons
|
||||
, docutils
|
||||
, gi-docgen
|
||||
, gobject-introspection
|
||||
, gtk-doc
|
||||
, libxslt
|
||||
|
@ -22,30 +24,33 @@ let
|
|||
domain = "source.puri.sm";
|
||||
owner = "Librem5";
|
||||
repo = "feedbackd-device-themes";
|
||||
rev = "v0.0.20220523";
|
||||
sha256 = "sha256-RyUZj+tpJSYhyoK+E98CTIoHwXwBdB1YHVnO5821exo=";
|
||||
rev = "v0.1.0";
|
||||
sha256 = "sha256-YK9fJ3awmhf1FAhdz95T/POivSO93jsNApm+u4OOZ80=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "feedbackd";
|
||||
# Not an actual upstream project release,
|
||||
# only a Debian package release that is tagged in the upstream repo
|
||||
version = "0.0.1";
|
||||
version = "0.1.0";
|
||||
|
||||
outputs = [ "out" "dev" ]
|
||||
# remove if cross-compiling gobject-introspection works
|
||||
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "source.puri.sm";
|
||||
owner = "Librem5";
|
||||
repo = "feedbackd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-l1FhECLPq8K9lzQ50sI/aH7fwR9xW1ATyk7EWRmLzuQ=";
|
||||
hash = "sha256-7H5Ah4zo+wLKd0WoKoOgtIm7HcUSw8PTf/KzBlY75oc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
docbook-xsl-nons
|
||||
docutils # for rst2man
|
||||
gi-docgen
|
||||
gobject-introspection
|
||||
gtk-doc
|
||||
libxslt
|
||||
|
@ -64,11 +69,8 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
|
||||
"-Dgtk_doc=true"
|
||||
"-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 = [
|
||||
|
@ -83,6 +85,17 @@ stdenv.mkDerivation rec {
|
|||
cp ${themes}/data/* $out/share/feedbackd/themes/
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Move developer documentation to devdoc output.
|
||||
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
||||
if [[ -d "$out/share/doc" ]]; then
|
||||
find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
|
||||
| while IFS= read -r -d ''' file; do
|
||||
moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
|
||||
done
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A daemon to provide haptic (and later more) feedback on events";
|
||||
homepage = "https://source.puri.sm/Librem5/feedbackd";
|
||||
|
|
Loading…
Reference in a new issue