Merge pull request #206634 from tomfitzhenry/feedbackd-0.0.2
This commit is contained in:
commit
5ea2a68929
|
@ -2,6 +2,8 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, docbook-xsl-nons
|
, docbook-xsl-nons
|
||||||
|
, docutils
|
||||||
|
, gi-docgen
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, gtk-doc
|
, gtk-doc
|
||||||
, libxslt
|
, libxslt
|
||||||
|
@ -22,30 +24,33 @@ let
|
||||||
domain = "source.puri.sm";
|
domain = "source.puri.sm";
|
||||||
owner = "Librem5";
|
owner = "Librem5";
|
||||||
repo = "feedbackd-device-themes";
|
repo = "feedbackd-device-themes";
|
||||||
rev = "v0.0.20220523";
|
rev = "v0.1.0";
|
||||||
sha256 = "sha256-RyUZj+tpJSYhyoK+E98CTIoHwXwBdB1YHVnO5821exo=";
|
sha256 = "sha256-YK9fJ3awmhf1FAhdz95T/POivSO93jsNApm+u4OOZ80=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "feedbackd";
|
pname = "feedbackd";
|
||||||
# Not an actual upstream project release,
|
version = "0.1.0";
|
||||||
# only a Debian package release that is tagged in the upstream repo
|
|
||||||
version = "0.0.1";
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" ]
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
# remove if cross-compiling gobject-introspection works
|
|
||||||
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "source.puri.sm";
|
domain = "source.puri.sm";
|
||||||
owner = "Librem5";
|
owner = "Librem5";
|
||||||
repo = "feedbackd";
|
repo = "feedbackd";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-l1FhECLPq8K9lzQ50sI/aH7fwR9xW1ATyk7EWRmLzuQ=";
|
hash = "sha256-7H5Ah4zo+wLKd0WoKoOgtIm7HcUSw8PTf/KzBlY75oc=";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
depsBuildBuild = [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
docbook-xsl-nons
|
docbook-xsl-nons
|
||||||
|
docutils # for rst2man
|
||||||
|
gi-docgen
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
gtk-doc
|
gtk-doc
|
||||||
libxslt
|
libxslt
|
||||||
|
@ -64,11 +69,8 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
|
"-Dgtk_doc=true"
|
||||||
"-Dman=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 = [
|
nativeCheckInputs = [
|
||||||
|
@ -83,6 +85,17 @@ stdenv.mkDerivation rec {
|
||||||
cp ${themes}/data/* $out/share/feedbackd/themes/
|
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; {
|
meta = with lib; {
|
||||||
description = "A daemon to provide haptic (and later more) feedback on events";
|
description = "A daemon to provide haptic (and later more) feedback on events";
|
||||||
homepage = "https://source.puri.sm/Librem5/feedbackd";
|
homepage = "https://source.puri.sm/Librem5/feedbackd";
|
||||||
|
|
Loading…
Reference in a new issue