lol

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

authored by

Guillaume Girol and committed by
GitHub
608a4a6e f4a76ebd

+238 -176
+5 -2
pkgs/desktops/lomiri/development/u1db-qt/default.nix
··· 10 10 pkg-config, 11 11 qtbase, 12 12 qtdeclarative, 13 + qttools, 13 14 }: 14 15 15 16 stdenv.mkDerivation (finalAttrs: { ··· 26 27 outputs = [ 27 28 "out" 28 29 "dev" 30 + "doc" 29 31 "examples" 30 32 ]; 31 33 ··· 56 58 cmake 57 59 pkg-config 58 60 qtdeclarative # qmlplugindump 61 + qttools # qdoc 59 62 ]; 60 63 61 64 buildInputs = [ ··· 66 69 nativeCheckInputs = [ dbus-test-runner ]; 67 70 68 71 cmakeFlags = [ 69 - # Needs qdoc, see https://github.com/NixOS/nixpkgs/pull/245379 70 - (lib.cmakeBool "BUILD_DOCS" false) 72 + (lib.cmakeBool "BUILD_DOCS" true) 71 73 ]; 72 74 73 75 dontWrapQtApps = true; ··· 101 103 meta = { 102 104 description = "Qt5 binding and QtQuick2 plugin for U1DB"; 103 105 homepage = "https://gitlab.com/ubports/development/core/u1db-qt"; 106 + changelog = "https://gitlab.com/ubports/development/core/u1db-qt/-/blob/${finalAttrs.version}/ChangeLog"; 104 107 license = lib.licenses.lgpl3Only; 105 108 maintainers = lib.teams.lomiri.members; 106 109 platforms = lib.platforms.linux;
+25 -18
pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , gitUpdater 5 - , testers 6 - , cmake 7 - , dbus 8 - , dbus-test-runner 9 - , pkg-config 10 - , qtbase 11 - , qtdeclarative 12 - , validatePkgConfig 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + gitUpdater, 6 + testers, 7 + cmake, 8 + dbus, 9 + dbus-test-runner, 10 + doxygen, 11 + pkg-config, 12 + qtbase, 13 + qtdeclarative, 14 + qttools, 15 + validatePkgConfig, 13 16 }: 14 17 15 18 stdenv.mkDerivation (finalAttrs: { ··· 26 29 outputs = [ 27 30 "out" 28 31 "dev" 32 + "doc" 29 33 ]; 30 34 31 35 postPatch = '' 32 36 # Queries QMake for broken Qt variable: '/build/qtbase-<commit>/$(out)/$(qtQmlPrefix)' 33 37 substituteInPlace qml/Lomiri/Action/CMakeLists.txt \ 34 - --replace 'exec_program(''${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")' 38 + --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}")' 39 + 40 + # Fix section labels 41 + substituteInPlace documentation/qml/pages/* \ 42 + --replace-warn '\part' '\section1' 35 43 ''; 36 44 37 45 strictDeps = true; 38 46 39 47 nativeBuildInputs = [ 40 48 cmake 49 + doxygen 41 50 pkg-config 42 51 qtdeclarative 52 + qttools # qdoc 43 53 validatePkgConfig 44 54 ]; 45 55 ··· 55 65 56 66 cmakeFlags = [ 57 67 (lib.cmakeBool "ENABLE_TESTING" finalAttrs.finalPackage.doCheck) 68 + (lib.cmakeBool "GENERATE_DOCUMENTATION" true) 58 69 # Use vendored libhud2, TODO package libhud2 separately? 59 70 (lib.cmakeBool "use_libhud2" false) 60 - # QML docs need qdoc, https://github.com/NixOS/nixpkgs/pull/245379 61 - (lib.cmakeBool "GENERATE_DOCUMENTATION" false) 62 71 ]; 63 72 64 73 dontWrapQtApps = true; ··· 82 91 license = licenses.lgpl3Only; 83 92 maintainers = teams.lomiri.members; 84 93 platforms = platforms.linux; 85 - pkgConfigModules = [ 86 - "lomiri-action-qt-1" 87 - ]; 94 + pkgConfigModules = [ "lomiri-action-qt-1" ]; 88 95 }; 89 96 })
+57 -36
pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , gitUpdater 5 - , substituteAll 6 - , testers 7 - , dbus-test-runner 8 - , dpkg 9 - , gdb 10 - , glib 11 - , lttng-ust 12 - , perl 13 - , pkg-config 14 - , python3 15 - , qmake 16 - , qtbase 17 - , qtdeclarative 18 - , qtfeedback 19 - , qtgraphicaleffects 20 - , qtpim 21 - , qtquickcontrols2 22 - , qtsvg 23 - , qtsystems 24 - , suru-icon-theme 25 - , validatePkgConfig 26 - , wrapQtAppsHook 27 - , xvfb-run 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + gitUpdater, 6 + substituteAll, 7 + testers, 8 + dbus-test-runner, 9 + dpkg, 10 + gdb, 11 + glib, 12 + lttng-ust, 13 + perl, 14 + pkg-config, 15 + python3, 16 + qmake, 17 + qtbase, 18 + qtdeclarative, 19 + qtfeedback, 20 + qtgraphicaleffects, 21 + qtpim, 22 + qtquickcontrols2, 23 + qtsvg, 24 + qtsystems, 25 + qttools, 26 + suru-icon-theme, 27 + validatePkgConfig, 28 + wrapQtAppsHook, 29 + xvfb-run, 28 30 }: 29 31 30 32 let 31 33 listToQtVar = suffix: lib.makeSearchPathOutput "bin" suffix; 32 - qtPluginPaths = listToQtVar qtbase.qtPluginPrefix [ qtbase qtpim qtsvg ]; 33 - qtQmlPaths = listToQtVar qtbase.qtQmlPrefix [ qtdeclarative qtfeedback qtgraphicaleffects ]; 34 + qtPluginPaths = listToQtVar qtbase.qtPluginPrefix [ 35 + qtbase 36 + qtpim 37 + qtsvg 38 + ]; 39 + qtQmlPaths = listToQtVar qtbase.qtQmlPrefix [ 40 + qtdeclarative 41 + qtfeedback 42 + qtgraphicaleffects 43 + ]; 34 44 in 35 45 stdenv.mkDerivation (finalAttrs: { 36 46 pname = "lomiri-ui-toolkit"; ··· 43 53 hash = "sha256-r+wUCl+ywFcgFYo7BjBoXiulQptd1Zd3LJchXiMtx4I="; 44 54 }; 45 55 46 - outputs = [ "out" "dev" ]; 56 + outputs = [ 57 + "out" 58 + "dev" 59 + "doc" 60 + ]; 47 61 48 62 patches = [ 49 63 ./2001-Mark-problematic-tests.patch 64 + 50 65 (substituteAll { 51 66 src = ./2002-Nixpkgs-versioned-QML-path.patch.in; 52 67 name = "2002-Nixpkgs-versioned-QML-path.patch"; ··· 67 82 substituteInPlace apicheck/apicheck.pro \ 68 83 --replace-fail "\''$\''$[QT_INSTALL_LIBS]/lomiri-ui-toolkit" "$out/bin" 69 84 85 + substituteInPlace documentation/documentation.pro \ 86 + --replace-fail '/usr/share/doc' '$$PREFIX/share/doc' \ 87 + --replace-fail '$$[QT_INSTALL_DOCS]' '$$PREFIX/share/doc/lomiri-ui-toolkit' 88 + 70 89 # Causes redefinition error with our own fortify hardening 71 90 sed -i '/DEFINES += _FORTIFY_SOURCE/d' features/lomiri_common.prf 72 91 ··· 105 124 pkg-config 106 125 python3 107 126 qmake 127 + qttools # qdoc, qhelpgenerator 108 128 validatePkgConfig 109 129 wrapQtAppsHook 110 130 ]; ··· 133 153 ]; 134 154 135 155 qmakeFlags = [ 136 - # docs require Qt5's qdoc, which we don't have before https://github.com/NixOS/nixpkgs/pull/245379 137 - "CONFIG+=no_docs" 138 156 # Ubuntu UITK compatibility, for older / not-yet-migrated applications 139 157 "CONFIG+=ubuntu-uitk-compat" 140 158 "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}" ··· 201 219 updateScript = gitUpdater { }; 202 220 }; 203 221 204 - meta = with lib; { 222 + meta = { 205 223 description = "QML components to ease the creation of beautiful applications in QML"; 206 224 longDescription = '' 207 225 This project consists of a set of QML components to ease the creation of beautiful applications in QML for Lomiri. ··· 219 237 ''; 220 238 homepage = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit"; 221 239 changelog = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/blob/${finalAttrs.version}/ChangeLog"; 222 - license = with licenses; [ gpl3Only cc-by-sa-30 ]; 223 - maintainers = teams.lomiri.members; 224 - platforms = platforms.linux; 240 + license = with lib.licenses; [ 241 + gpl3Only 242 + cc-by-sa-30 243 + ]; 244 + maintainers = lib.teams.lomiri.members; 245 + platforms = lib.platforms.linux; 225 246 pkgConfigModules = [ 226 247 "LomiriGestures" 227 248 "LomiriMetrics"
+54 -39
pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , gitUpdater 5 - , testers 6 - , cmake 7 - , cmake-extras 8 - , dbus-test-runner 9 - , gettext 10 - , glib 11 - , gsettings-qt 12 - , gtest 13 - , libapparmor 14 - , libnotify 15 - , lomiri-api 16 - , lomiri-app-launch 17 - , lomiri-download-manager 18 - , lomiri-ui-toolkit 19 - , pkg-config 20 - , properties-cpp 21 - , qtbase 22 - , qtdeclarative 23 - , qtfeedback 24 - , qtgraphicaleffects 25 - , validatePkgConfig 26 - , wrapGAppsHook3 27 - , xvfb-run 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + gitUpdater, 6 + testers, 7 + cmake, 8 + cmake-extras, 9 + dbus-test-runner, 10 + gettext, 11 + glib, 12 + gsettings-qt, 13 + gtest, 14 + libapparmor, 15 + libnotify, 16 + lomiri-api, 17 + lomiri-app-launch, 18 + lomiri-download-manager, 19 + lomiri-ui-toolkit, 20 + pkg-config, 21 + properties-cpp, 22 + qtbase, 23 + qtdeclarative, 24 + qtfeedback, 25 + qtgraphicaleffects, 26 + qttools, 27 + validatePkgConfig, 28 + wrapGAppsHook3, 29 + xvfb-run, 28 30 }: 29 31 30 32 stdenv.mkDerivation (finalAttrs: { ··· 41 43 outputs = [ 42 44 "out" 43 45 "dev" 46 + "doc" 44 47 "examples" 45 48 ]; 46 49 ··· 64 67 gettext 65 68 pkg-config 66 69 qtdeclarative # qmlplugindump 70 + qttools # qdoc 67 71 validatePkgConfig 68 72 wrapGAppsHook3 69 73 ]; ··· 90 94 xvfb-run 91 95 ]; 92 96 93 - checkInputs = [ 94 - gtest 95 - ]; 97 + checkInputs = [ gtest ]; 96 98 97 99 dontWrapQtApps = true; 98 100 ··· 100 102 (lib.cmakeBool "GSETTINGS_COMPILE" true) 101 103 (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true) 102 104 (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) 103 - (lib.cmakeBool "ENABLE_DOC" false) # needs Qt5 qdoc: https://github.com/NixOS/nixpkgs/pull/245379 105 + (lib.cmakeBool "ENABLE_DOC" true) 104 106 (lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # in case something still depends on it 105 107 ]; 106 108 107 - preBuild = let 108 - listToQtVar = list: suffix: lib.strings.concatMapStringsSep ":" (drv: "${lib.getBin drv}/${suffix}") list; 109 - in '' 110 - # Executes qmlplugindump 111 - export QT_PLUGIN_PATH=${listToQtVar [ qtbase ] qtbase.qtPluginPrefix} 112 - export QML2_IMPORT_PATH=${listToQtVar [ qtdeclarative lomiri-ui-toolkit qtfeedback qtgraphicaleffects ] qtbase.qtQmlPrefix} 113 - ''; 109 + preBuild = 110 + let 111 + listToQtVar = 112 + list: suffix: lib.strings.concatMapStringsSep ":" (drv: "${lib.getBin drv}/${suffix}") list; 113 + in 114 + '' 115 + # Executes qmlplugindump 116 + export QT_PLUGIN_PATH=${listToQtVar [ qtbase ] qtbase.qtPluginPrefix} 117 + export QML2_IMPORT_PATH=${ 118 + listToQtVar [ 119 + qtdeclarative 120 + lomiri-ui-toolkit 121 + qtfeedback 122 + qtgraphicaleffects 123 + ] qtbase.qtQmlPrefix 124 + } 125 + ''; 114 126 115 127 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 116 128 ··· 145 157 ''; 146 158 homepage = "https://gitlab.com/ubports/development/core/lomiri-content-hub"; 147 159 changelog = "https://gitlab.com/ubports/development/core/lomiri-content-hub/-/blob/${finalAttrs.version}/ChangeLog"; 148 - license = with lib.licenses; [ gpl3Only lgpl3Only ]; 160 + license = with lib.licenses; [ 161 + gpl3Only 162 + lgpl3Only 163 + ]; 149 164 mainProgram = "lomiri-content-hub-service"; 150 165 maintainers = lib.teams.lomiri.members; 151 166 platforms = lib.platforms.linux;
+45 -49
pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , fetchpatch 5 - , gitUpdater 6 - , testers 7 - , boost 8 - , cmake 9 - , cmake-extras 10 - , dbus 11 - , dbus-test-runner 12 - # Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379 13 - , withDocumentation ? false 14 - , doxygen 15 - , glog 16 - , graphviz 17 - , gtest 18 - , lomiri-api 19 - , pkg-config 20 - , python3 21 - , qtbase 22 - , qtdeclarative 23 - , validatePkgConfig 24 - , wrapQtAppsHook 25 - , xvfb-run 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + fetchpatch, 6 + gitUpdater, 7 + testers, 8 + boost, 9 + cmake, 10 + cmake-extras, 11 + dbus, 12 + dbus-test-runner, 13 + withDocumentation ? true, 14 + doxygen, 15 + glog, 16 + graphviz, 17 + gtest, 18 + lomiri-api, 19 + pkg-config, 20 + python3, 21 + qtbase, 22 + qtdeclarative, 23 + qttools, 24 + validatePkgConfig, 25 + wrapQtAppsHook, 26 + xvfb-run, 26 27 }: 27 28 28 29 stdenv.mkDerivation (finalAttrs: { ··· 39 40 outputs = [ 40 41 "out" 41 42 "dev" 42 - ] ++ lib.optionals withDocumentation [ 43 - "doc" 44 - ]; 43 + ] ++ lib.optionals withDocumentation [ "doc" ]; 45 44 46 45 patches = [ 47 46 # This change seems incomplete, potentially breaks things on systems that don't use AppArmor mediation ··· 69 68 70 69 strictDeps = true; 71 70 72 - nativeBuildInputs = [ 73 - cmake 74 - pkg-config 75 - validatePkgConfig 76 - wrapQtAppsHook 77 - ] ++ lib.optionals withDocumentation [ 78 - doxygen 79 - graphviz 80 - ]; 71 + nativeBuildInputs = 72 + [ 73 + cmake 74 + pkg-config 75 + validatePkgConfig 76 + wrapQtAppsHook 77 + ] 78 + ++ lib.optionals withDocumentation [ 79 + doxygen 80 + graphviz 81 + qttools # qdoc 82 + ]; 81 83 82 84 buildInputs = [ 83 85 boost ··· 95 97 xvfb-run 96 98 ]; 97 99 98 - checkInputs = [ 99 - gtest 100 - ]; 100 + checkInputs = [ gtest ]; 101 101 102 102 cmakeFlags = [ 103 103 (lib.cmakeBool "ENABLE_DOC" withDocumentation) ··· 106 106 (lib.cmakeBool "ENABLE_WERROR" false) 107 107 ]; 108 108 109 - makeTargets = [ 110 - "all" 111 - ] ++ lib.optionals withDocumentation [ 112 - "doc" 113 - ]; 109 + makeTargets = [ "all" ] ++ lib.optionals withDocumentation [ "doc" ]; 114 110 115 111 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 116 112 ··· 127 123 updateScript = gitUpdater { }; 128 124 }; 129 125 130 - meta = with lib; { 126 + meta = { 131 127 description = "Performs uploads and downloads from a centralized location"; 132 128 homepage = "https://gitlab.com/ubports/development/core/lomiri-download-manager"; 133 129 changelog = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/blob/${finalAttrs.version}/ChangeLog"; 134 - license = licenses.lgpl3Only; 135 - maintainers = teams.lomiri.members; 136 - platforms = platforms.linux; 130 + license = lib.licenses.lgpl3Only; 131 + maintainers = lib.teams.lomiri.members; 132 + platforms = lib.platforms.linux; 137 133 pkgConfigModules = [ 138 134 "ldm-common" 139 135 "lomiri-download-manager-client"
+3 -1
pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix
··· 28 28 python3, 29 29 qtdeclarative, 30 30 qtbase, 31 + qttools, 31 32 validatePkgConfig, 32 33 }: 33 34 ··· 74 75 intltool 75 76 pkg-config 76 77 qtdeclarative 78 + qttools # qdoc 77 79 validatePkgConfig 78 80 ]; 79 81 ··· 106 108 (lib.cmakeBool "GSETTINGS_COMPILE" true) 107 109 (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) 108 110 (lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # just in case something needs it 109 - (lib.cmakeBool "BUILD_DOC" true) # lacks QML docs, needs qdoc: https://github.com/NixOS/nixpkgs/pull/245379 111 + (lib.cmakeBool "BUILD_DOC" true) 110 112 ]; 111 113 112 114 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+49 -31
pkgs/development/libraries/accounts-qml-module/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchFromGitLab 4 - , accounts-qt 5 - , dbus-test-runner 6 - , pkg-config 7 - , qmake 8 - , qtbase 9 - , qtdeclarative 10 - , signond 11 - , xvfb-run 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + unstableGitUpdater, 6 + accounts-qt, 7 + dbus-test-runner, 8 + pkg-config, 9 + qmake, 10 + qtbase, 11 + qtdeclarative, 12 + qttools, 13 + signond, 14 + xvfb-run, 12 15 }: 13 16 14 17 stdenv.mkDerivation (finalAttrs: { 15 18 pname = "accounts-qml-module"; 16 - version = "0.7-unstable-2022-10-28"; 19 + version = "0.7-unstable-2023-10-28"; 17 20 18 21 src = fetchFromGitLab { 19 22 owner = "accounts-sso"; ··· 22 25 hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84="; 23 26 }; 24 27 25 - postPatch = '' 26 - substituteInPlace src/src.pro \ 27 - --replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \ 28 - --replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}' 28 + outputs = [ 29 + "out" 30 + "doc" 31 + ]; 29 32 30 - # Don't install test binary 31 - sed -i tests/tst_plugin.pro \ 32 - -e '/TARGET = tst_plugin/a INSTALLS -= target' 33 - '' + lib.optionalString (!finalAttrs.finalPackage.doCheck) '' 34 - sed -i accounts-qml-module.pro -e '/tests/d' 35 - ''; 33 + postPatch = 34 + '' 35 + substituteInPlace src/src.pro \ 36 + --replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \ 37 + --replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}' 38 + 39 + # Find qdoc 40 + substituteInPlace doc/doc.pri \ 41 + --replace-fail 'QDOC = $$[QT_INSTALL_BINS]/qdoc' 'QDOC = qdoc' 42 + 43 + # Don't install test binary 44 + sed -i tests/tst_plugin.pro \ 45 + -e '/TARGET = tst_plugin/a INSTALLS -= target' 46 + '' 47 + + lib.optionalString (!finalAttrs.finalPackage.doCheck) '' 48 + sed -i accounts-qml-module.pro -e '/tests/d' 49 + ''; 36 50 37 51 # QMake can't find Qt modules in buildInputs 38 52 strictDeps = false; ··· 41 55 pkg-config 42 56 qmake 43 57 qtdeclarative # qmlplugindump 58 + qttools # qdoc 44 59 ]; 45 60 46 61 buildInputs = [ ··· 57 72 58 73 dontWrapQtApps = true; 59 74 60 - qmakeFlags = [ 61 - # Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379 62 - "CONFIG+=no_docs" 63 - ]; 64 - 65 75 postConfigure = '' 66 76 make qmake_all 67 77 ''; ··· 78 88 export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix} 79 89 ''; 80 90 81 - meta = with lib; { 91 + postFixup = '' 92 + moveToOutput share/accounts-qml-module/doc $doc 93 + ''; 94 + 95 + passthru.updateScript = unstableGitUpdater { 96 + tagPrefix = "VERSION_"; 97 + }; 98 + 99 + meta = { 82 100 description = "QML bindings for libaccounts-qt + libsignon-qt"; 83 101 homepage = "https://gitlab.com/accounts-sso/accounts-qml-module"; 84 - license = licenses.lgpl21Only; 85 - maintainers = with maintainers; [ OPNA2608 ]; 86 - platforms = platforms.linux; 102 + license = lib.licenses.lgpl21Only; 103 + maintainers = with lib.maintainers; [ OPNA2608 ]; 104 + platforms = lib.platforms.linux; 87 105 }; 88 106 })