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

This commit is contained in:
Guillaume Girol 2024-11-10 16:20:32 +01:00 committed by GitHub
commit 608a4a6e70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 238 additions and 176 deletions

View File

@ -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;

View File

@ -1,15 +1,18 @@
{ 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" ];
};
})

View File

@ -1,36 +1,46 @@
{ 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"

View File

@ -1,30 +1,32 @@
{ 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,17 +102,27 @@ 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 ''
# Executes qmlplugindump
export QT_PLUGIN_PATH=${listToQtVar [ qtbase ] qtbase.qtPluginPrefix}
export QML2_IMPORT_PATH=${listToQtVar [ qtdeclarative lomiri-ui-toolkit qtfeedback qtgraphicaleffects ] qtbase.qtQmlPrefix}
'';
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
}
'';
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;

View File

@ -1,28 +1,29 @@
{ 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,15 +68,18 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
validatePkgConfig
wrapQtAppsHook
] ++ lib.optionals withDocumentation [
doxygen
graphviz
];
nativeBuildInputs =
[
cmake
pkg-config
validatePkgConfig
wrapQtAppsHook
]
++ lib.optionals withDocumentation [
doxygen
graphviz
qttools # qdoc
];
buildInputs = [
boost
@ -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"

View File

@ -28,6 +28,7 @@
python3,
qtdeclarative,
qtbase,
qttools,
validatePkgConfig,
}:
@ -74,6 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
intltool
pkg-config
qtdeclarative
qttools # qdoc
validatePkgConfig
];
@ -106,7 +108,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "GSETTINGS_COMPILE" true)
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # just in case something needs it
(lib.cmakeBool "BUILD_DOC" true) # lacks QML docs, needs qdoc: https://github.com/NixOS/nixpkgs/pull/245379
(lib.cmakeBool "BUILD_DOC" true)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

View File

@ -1,19 +1,22 @@
{ stdenv
, lib
, fetchFromGitLab
, accounts-qt
, dbus-test-runner
, pkg-config
, qmake
, qtbase
, qtdeclarative
, signond
, xvfb-run
{
stdenv,
lib,
fetchFromGitLab,
unstableGitUpdater,
accounts-qt,
dbus-test-runner,
pkg-config,
qmake,
qtbase,
qtdeclarative,
qttools,
signond,
xvfb-run,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "accounts-qml-module";
version = "0.7-unstable-2022-10-28";
version = "0.7-unstable-2023-10-28";
src = fetchFromGitLab {
owner = "accounts-sso";
@ -22,17 +25,28 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84=";
};
postPatch = ''
substituteInPlace src/src.pro \
--replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \
--replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
outputs = [
"out"
"doc"
];
# Don't install test binary
sed -i tests/tst_plugin.pro \
-e '/TARGET = tst_plugin/a INSTALLS -= target'
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
sed -i accounts-qml-module.pro -e '/tests/d'
'';
postPatch =
''
substituteInPlace src/src.pro \
--replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \
--replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
# Find qdoc
substituteInPlace doc/doc.pri \
--replace-fail 'QDOC = $$[QT_INSTALL_BINS]/qdoc' 'QDOC = qdoc'
# Don't install test binary
sed -i tests/tst_plugin.pro \
-e '/TARGET = tst_plugin/a INSTALLS -= target'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
sed -i accounts-qml-module.pro -e '/tests/d'
'';
# QMake can't find Qt modules in buildInputs
strictDeps = false;
@ -41,6 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
qmake
qtdeclarative # qmlplugindump
qttools # qdoc
];
buildInputs = [
@ -57,11 +72,6 @@ stdenv.mkDerivation (finalAttrs: {
dontWrapQtApps = true;
qmakeFlags = [
# Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379
"CONFIG+=no_docs"
];
postConfigure = ''
make qmake_all
'';
@ -78,11 +88,19 @@ stdenv.mkDerivation (finalAttrs: {
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
meta = with lib; {
postFixup = ''
moveToOutput share/accounts-qml-module/doc $doc
'';
passthru.updateScript = unstableGitUpdater {
tagPrefix = "VERSION_";
};
meta = {
description = "QML bindings for libaccounts-qt + libsignon-qt";
homepage = "https://gitlab.com/accounts-sso/accounts-qml-module";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
license = lib.licenses.lgpl21Only;
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.linux;
};
})