summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-03-06 14:34:09 +0200
committerGitHub <noreply@github.com>2023-03-06 14:34:09 +0200
commit5ea2a68929729533b7d4519c6445ee3e7f557ded (patch)
treefa10e9d8b57337e27b93872d7ed31978951fdf4b
parentb6cc2f2979a19ec2983cef156d5d44b2fe0e545f (diff)
parent7aa0bc3c377d753c0964542eccd997aabaaf78a3 (diff)
downloadnixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar.gz
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar.bz2
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar.lz
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar.xz
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.tar.zst
nixpkgs-5ea2a68929729533b7d4519c6445ee3e7f557ded.zip
Merge pull request #206634 from tomfitzhenry/feedbackd-0.0.2
-rw-r--r--pkgs/applications/misc/feedbackd/default.nix39
1 files changed, 26 insertions, 13 deletions
diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix
index 781bdfcb90f..e3dd4f94b86 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
@@ -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";