summary refs log tree commit diff
diff options
context:
space:
mode:
authorTom Fitzhenry <tom@tom-fitzhenry.me.uk>2022-12-18 10:28:29 +1100
committerArtturin <Artturin@artturin.com>2023-02-03 12:35:30 +0200
commit012434d4815a7a3221c2f8b9568cb6285e810059 (patch)
tree25756df4dff654dbe32351cf63a01a5b9c9f3ca6
parent0f5996b524c91677891a432cc99c7567c7c402b1 (diff)
downloadnixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar.gz
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar.bz2
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar.lz
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar.xz
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.tar.zst
nixpkgs-012434d4815a7a3221c2f8b9568cb6285e810059.zip
feedbackd: 0.0.1 -> 0.0.3
depsBuildBuild pkg-config is for build time tool detection

https://source.puri.sm/Librem5/feedbackd/-/releases/v0.0.2

https://source.puri.sm/Librem5/feedbackd/-/releases/v0.0.3
-rw-r--r--pkgs/applications/misc/feedbackd/default.nix35
1 files changed, 24 insertions, 11 deletions
diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix
index b2c5dfe2ccf..b19cec6f7e5 100644
--- a/pkgs/applications/misc/feedbackd/default.nix
+++ b/pkgs/applications/misc/feedbackd/default.nix
@@ -2,6 +2,8 @@
 , stdenv
 , fetchFromGitLab
 , docbook-xsl-nons
+, docutils
+, gi-docgen
 , gobject-introspection
 , gtk-doc
 , libxslt
@@ -28,24 +30,27 @@ let
 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.0.3";
 
-  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-ehWLC9PDDcD+muUPruzp8UvNddJBdrmW6gFxKVouY3c=";
+    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"}"
   ];
 
   checkInputs = [
@@ -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";