Commit 012434d4 authored by Tom Fitzhenry's avatar Tom Fitzhenry Committed by Artturin
Browse files

feedbackd: 0.0.1 -> 0.0.3

parent 0f5996b5
Loading
Loading
Loading
Loading
+24 −11
Original line number Diff line number Diff line
@@ -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";