Unverified Commit 608a4a6e authored by Guillaume Girol's avatar Guillaume Girol Committed by GitHub
Browse files

libsForQt5.accounts-qml-module,lomiri.*: Enable qdoc docs (#352601)

parents f4a76ebd 4d808176
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  pkg-config,
  qtbase,
  qtdeclarative,
  qttools,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -26,6 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
  outputs = [
    "out"
    "dev"
    "doc"
    "examples"
  ];

@@ -56,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
    cmake
    pkg-config
    qtdeclarative # qmlplugindump
    qttools # qdoc
  ];

  buildInputs = [
@@ -66,8 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
  nativeCheckInputs = [ dbus-test-runner ];

  cmakeFlags = [
    # Needs qdoc, see https://github.com/NixOS/nixpkgs/pull/245379
    (lib.cmakeBool "BUILD_DOCS" false)
    (lib.cmakeBool "BUILD_DOCS" true)
  ];

  dontWrapQtApps = true;
@@ -101,6 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
  meta = {
    description = "Qt5 binding and QtQuick2 plugin for U1DB";
    homepage = "https://gitlab.com/ubports/development/core/u1db-qt";
    changelog = "https://gitlab.com/ubports/development/core/u1db-qt/-/blob/${finalAttrs.version}/ChangeLog";
    license = lib.licenses.lgpl3Only;
    maintainers = lib.teams.lomiri.members;
    platforms = lib.platforms.linux;
+25 −18
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, gitUpdater
, testers
, cmake
, dbus
, dbus-test-runner
, pkg-config
, qtbase
, qtdeclarative
, validatePkgConfig
{
  stdenv,
  lib,
  fetchFromGitLab,
  gitUpdater,
  testers,
  cmake,
  dbus,
  dbus-test-runner,
  doxygen,
  pkg-config,
  qtbase,
  qtdeclarative,
  qttools,
  validatePkgConfig,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -26,20 +29,27 @@ stdenv.mkDerivation (finalAttrs: {
  outputs = [
    "out"
    "dev"
    "doc"
  ];

  postPatch = ''
    # Queries QMake for broken Qt variable: '/build/qtbase-<commit>/$(out)/$(qtQmlPrefix)'
    substituteInPlace qml/Lomiri/Action/CMakeLists.txt \
      --replace 'exec_program(''${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'
      --replace-fail 'exec_program(''${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'

    # Fix section labels
    substituteInPlace documentation/qml/pages/* \
      --replace-warn '\part' '\section1'
  '';

  strictDeps = true;

  nativeBuildInputs = [
    cmake
    doxygen
    pkg-config
    qtdeclarative
    qttools # qdoc
    validatePkgConfig
  ];

@@ -55,10 +65,9 @@ stdenv.mkDerivation (finalAttrs: {

  cmakeFlags = [
    (lib.cmakeBool "ENABLE_TESTING" finalAttrs.finalPackage.doCheck)
    (lib.cmakeBool "GENERATE_DOCUMENTATION" true)
    # Use vendored libhud2, TODO package libhud2 separately?
    (lib.cmakeBool "use_libhud2" false)
    # QML docs need qdoc, https://github.com/NixOS/nixpkgs/pull/245379
    (lib.cmakeBool "GENERATE_DOCUMENTATION" false)
  ];

  dontWrapQtApps = true;
@@ -82,8 +91,6 @@ stdenv.mkDerivation (finalAttrs: {
    license = licenses.lgpl3Only;
    maintainers = teams.lomiri.members;
    platforms = platforms.linux;
    pkgConfigModules = [
      "lomiri-action-qt-1"
    ];
    pkgConfigModules = [ "lomiri-action-qt-1" ];
  };
})
+57 −36
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, gitUpdater
, substituteAll
, testers
, dbus-test-runner
, dpkg
, gdb
, glib
, lttng-ust
, perl
, pkg-config
, python3
, qmake
, qtbase
, qtdeclarative
, qtfeedback
, qtgraphicaleffects
, qtpim
, qtquickcontrols2
, qtsvg
, qtsystems
, suru-icon-theme
, validatePkgConfig
, wrapQtAppsHook
, xvfb-run
{
  stdenv,
  lib,
  fetchFromGitLab,
  gitUpdater,
  substituteAll,
  testers,
  dbus-test-runner,
  dpkg,
  gdb,
  glib,
  lttng-ust,
  perl,
  pkg-config,
  python3,
  qmake,
  qtbase,
  qtdeclarative,
  qtfeedback,
  qtgraphicaleffects,
  qtpim,
  qtquickcontrols2,
  qtsvg,
  qtsystems,
  qttools,
  suru-icon-theme,
  validatePkgConfig,
  wrapQtAppsHook,
  xvfb-run,
}:

let
  listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix;
  qtPluginPaths = listToQtVar qtbase.qtPluginPrefix [ qtbase qtpim qtsvg ];
  qtQmlPaths = listToQtVar qtbase.qtQmlPrefix [ qtdeclarative qtfeedback qtgraphicaleffects ];
  qtPluginPaths = listToQtVar qtbase.qtPluginPrefix [
    qtbase
    qtpim
    qtsvg
  ];
  qtQmlPaths = listToQtVar qtbase.qtQmlPrefix [
    qtdeclarative
    qtfeedback
    qtgraphicaleffects
  ];
in
stdenv.mkDerivation (finalAttrs: {
  pname = "lomiri-ui-toolkit";
@@ -43,10 +53,15 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-r+wUCl+ywFcgFYo7BjBoXiulQptd1Zd3LJchXiMtx4I=";
  };

  outputs = [ "out" "dev" ];
  outputs = [
    "out"
    "dev"
    "doc"
  ];

  patches = [
    ./2001-Mark-problematic-tests.patch

    (substituteAll {
      src = ./2002-Nixpkgs-versioned-QML-path.patch.in;
      name = "2002-Nixpkgs-versioned-QML-path.patch";
@@ -67,6 +82,10 @@ stdenv.mkDerivation (finalAttrs: {
    substituteInPlace apicheck/apicheck.pro \
      --replace-fail "\''$\''$[QT_INSTALL_LIBS]/lomiri-ui-toolkit" "$out/bin"

    substituteInPlace documentation/documentation.pro \
      --replace-fail '/usr/share/doc' '$$PREFIX/share/doc' \
      --replace-fail '$$[QT_INSTALL_DOCS]' '$$PREFIX/share/doc/lomiri-ui-toolkit'

    # Causes redefinition error with our own fortify hardening
    sed -i '/DEFINES += _FORTIFY_SOURCE/d' features/lomiri_common.prf

@@ -105,6 +124,7 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
    python3
    qmake
    qttools # qdoc, qhelpgenerator
    validatePkgConfig
    wrapQtAppsHook
  ];
@@ -133,8 +153,6 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  qmakeFlags = [
    # docs require Qt5's qdoc, which we don't have before https://github.com/NixOS/nixpkgs/pull/245379
    "CONFIG+=no_docs"
    # Ubuntu UITK compatibility, for older / not-yet-migrated applications
    "CONFIG+=ubuntu-uitk-compat"
    "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}"
@@ -201,7 +219,7 @@ stdenv.mkDerivation (finalAttrs: {
    updateScript = gitUpdater { };
  };

  meta = with lib; {
  meta = {
    description = "QML components to ease the creation of beautiful applications in QML";
    longDescription = ''
      This project consists of a set of QML components to ease the creation of beautiful applications in QML for Lomiri.
@@ -219,9 +237,12 @@ stdenv.mkDerivation (finalAttrs: {
    '';
    homepage = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit";
    changelog = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/blob/${finalAttrs.version}/ChangeLog";
    license = with licenses; [ gpl3Only cc-by-sa-30 ];
    maintainers = teams.lomiri.members;
    platforms = platforms.linux;
    license = with lib.licenses; [
      gpl3Only
      cc-by-sa-30
    ];
    maintainers = lib.teams.lomiri.members;
    platforms = lib.platforms.linux;
    pkgConfigModules = [
      "LomiriGestures"
      "LomiriMetrics"
+54 −39
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, gitUpdater
, testers
, cmake
, cmake-extras
, dbus-test-runner
, gettext
, glib
, gsettings-qt
, gtest
, libapparmor
, libnotify
, lomiri-api
, lomiri-app-launch
, lomiri-download-manager
, lomiri-ui-toolkit
, pkg-config
, properties-cpp
, qtbase
, qtdeclarative
, qtfeedback
, qtgraphicaleffects
, validatePkgConfig
, wrapGAppsHook3
, xvfb-run
{
  stdenv,
  lib,
  fetchFromGitLab,
  gitUpdater,
  testers,
  cmake,
  cmake-extras,
  dbus-test-runner,
  gettext,
  glib,
  gsettings-qt,
  gtest,
  libapparmor,
  libnotify,
  lomiri-api,
  lomiri-app-launch,
  lomiri-download-manager,
  lomiri-ui-toolkit,
  pkg-config,
  properties-cpp,
  qtbase,
  qtdeclarative,
  qtfeedback,
  qtgraphicaleffects,
  qttools,
  validatePkgConfig,
  wrapGAppsHook3,
  xvfb-run,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -41,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
  outputs = [
    "out"
    "dev"
    "doc"
    "examples"
  ];

@@ -64,6 +67,7 @@ stdenv.mkDerivation (finalAttrs: {
    gettext
    pkg-config
    qtdeclarative # qmlplugindump
    qttools # qdoc
    validatePkgConfig
    wrapGAppsHook3
  ];
@@ -90,9 +94,7 @@ stdenv.mkDerivation (finalAttrs: {
    xvfb-run
  ];

  checkInputs = [
    gtest
  ];
  checkInputs = [ gtest ];

  dontWrapQtApps = true;

@@ -100,16 +102,26 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.cmakeBool "GSETTINGS_COMPILE" true)
    (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
    (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
    (lib.cmakeBool "ENABLE_DOC" false) # needs Qt5 qdoc: https://github.com/NixOS/nixpkgs/pull/245379
    (lib.cmakeBool "ENABLE_DOC" true)
    (lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # in case something still depends on it
  ];

  preBuild = let
    listToQtVar = list: suffix: lib.strings.concatMapStringsSep ":" (drv: "${lib.getBin drv}/${suffix}") list;
  in ''
  preBuild =
    let
      listToQtVar =
        list: suffix: lib.strings.concatMapStringsSep ":" (drv: "${lib.getBin drv}/${suffix}") list;
    in
    ''
      # Executes qmlplugindump
      export QT_PLUGIN_PATH=${listToQtVar [ qtbase ] qtbase.qtPluginPrefix}
    export QML2_IMPORT_PATH=${listToQtVar [ qtdeclarative lomiri-ui-toolkit qtfeedback qtgraphicaleffects ] qtbase.qtQmlPrefix}
      export QML2_IMPORT_PATH=${
        listToQtVar [
          qtdeclarative
          lomiri-ui-toolkit
          qtfeedback
          qtgraphicaleffects
        ] qtbase.qtQmlPrefix
      }
    '';

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
@@ -145,7 +157,10 @@ stdenv.mkDerivation (finalAttrs: {
    '';
    homepage = "https://gitlab.com/ubports/development/core/lomiri-content-hub";
    changelog = "https://gitlab.com/ubports/development/core/lomiri-content-hub/-/blob/${finalAttrs.version}/ChangeLog";
    license = with lib.licenses; [ gpl3Only lgpl3Only ];
    license = with lib.licenses; [
      gpl3Only
      lgpl3Only
    ];
    mainProgram = "lomiri-content-hub-service";
    maintainers = lib.teams.lomiri.members;
    platforms = lib.platforms.linux;
+45 −49
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, testers
, boost
, cmake
, cmake-extras
, dbus
, dbus-test-runner
# Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379
, withDocumentation ? false
, doxygen
, glog
, graphviz
, gtest
, lomiri-api
, pkg-config
, python3
, qtbase
, qtdeclarative
, validatePkgConfig
, wrapQtAppsHook
, xvfb-run
{
  stdenv,
  lib,
  fetchFromGitLab,
  fetchpatch,
  gitUpdater,
  testers,
  boost,
  cmake,
  cmake-extras,
  dbus,
  dbus-test-runner,
  withDocumentation ? true,
  doxygen,
  glog,
  graphviz,
  gtest,
  lomiri-api,
  pkg-config,
  python3,
  qtbase,
  qtdeclarative,
  qttools,
  validatePkgConfig,
  wrapQtAppsHook,
  xvfb-run,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -39,9 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
  outputs = [
    "out"
    "dev"
  ] ++ lib.optionals withDocumentation [
    "doc"
  ];
  ] ++ lib.optionals withDocumentation [ "doc" ];

  patches = [
    # This change seems incomplete, potentially breaks things on systems that don't use AppArmor mediation
@@ -69,14 +68,17 @@ stdenv.mkDerivation (finalAttrs: {

  strictDeps = true;

  nativeBuildInputs = [
  nativeBuildInputs =
    [
      cmake
      pkg-config
      validatePkgConfig
      wrapQtAppsHook
  ] ++ lib.optionals withDocumentation [
    ]
    ++ lib.optionals withDocumentation [
      doxygen
      graphviz
      qttools # qdoc
    ];

  buildInputs = [
@@ -95,9 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
    xvfb-run
  ];

  checkInputs = [
    gtest
  ];
  checkInputs = [ gtest ];

  cmakeFlags = [
    (lib.cmakeBool "ENABLE_DOC" withDocumentation)
@@ -106,11 +106,7 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.cmakeBool "ENABLE_WERROR" false)
  ];

  makeTargets = [
    "all"
  ] ++ lib.optionals withDocumentation [
    "doc"
  ];
  makeTargets = [ "all" ] ++ lib.optionals withDocumentation [ "doc" ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

@@ -127,13 +123,13 @@ stdenv.mkDerivation (finalAttrs: {
    updateScript = gitUpdater { };
  };

  meta = with lib; {
  meta = {
    description = "Performs uploads and downloads from a centralized location";
    homepage = "https://gitlab.com/ubports/development/core/lomiri-download-manager";
    changelog = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/blob/${finalAttrs.version}/ChangeLog";
    license = licenses.lgpl3Only;
    maintainers = teams.lomiri.members;
    platforms = platforms.linux;
    license = lib.licenses.lgpl3Only;
    maintainers = lib.teams.lomiri.members;
    platforms = lib.platforms.linux;
    pkgConfigModules = [
      "ldm-common"
      "lomiri-download-manager-client"
Loading