From 4442e5ac9161ba2379297fb39bd8b56ef3855bd8 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 00:42:16 +0100 Subject: [PATCH 01/14] libsForQt5.accounts-qml-module: Enable qdoc docs --- .../libraries/accounts-qml-module/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/accounts-qml-module/default.nix b/pkgs/development/libraries/accounts-qml-module/default.nix index 858f9c0d57b8..cf0a5b7e8d0b 100644 --- a/pkgs/development/libraries/accounts-qml-module/default.nix +++ b/pkgs/development/libraries/accounts-qml-module/default.nix @@ -7,6 +7,7 @@ , qmake , qtbase , qtdeclarative +, qttools , signond , xvfb-run }: @@ -22,11 +23,20 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84="; }; + outputs = [ + "out" + "doc" + ]; + 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' @@ -41,6 +51,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config qmake qtdeclarative # qmlplugindump + qttools # qdoc ]; buildInputs = [ @@ -57,11 +68,6 @@ stdenv.mkDerivation (finalAttrs: { dontWrapQtApps = true; - qmakeFlags = [ - # Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379 - "CONFIG+=no_docs" - ]; - postConfigure = '' make qmake_all ''; @@ -78,6 +84,10 @@ stdenv.mkDerivation (finalAttrs: { export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix} ''; + postFixup = '' + moveToOutput share/accounts-qml-module/doc $doc + ''; + meta = with lib; { description = "QML bindings for libaccounts-qt + libsignon-qt"; homepage = "https://gitlab.com/accounts-sso/accounts-qml-module"; From eeea8d648db2f1bf64daf3efda503c56d673fd12 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 00:54:46 +0100 Subject: [PATCH 02/14] lomiri.u1db-qt: Enable qdoc docs --- pkgs/desktops/lomiri/development/u1db-qt/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/development/u1db-qt/default.nix b/pkgs/desktops/lomiri/development/u1db-qt/default.nix index 9bba0d914c7a..536b4f9c78dd 100644 --- a/pkgs/desktops/lomiri/development/u1db-qt/default.nix +++ b/pkgs/desktops/lomiri/development/u1db-qt/default.nix @@ -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; From 8f74b6cdaf783aae29e998aaba69861277712320 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 01:07:13 +0100 Subject: [PATCH 03/14] lomiri.lomiri-action-api: Enable qdoc docs --- .../lomiri/qml/lomiri-action-api/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix b/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix index 35eccd897157..20e8fe9f239d 100644 --- a/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix +++ b/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix @@ -6,9 +6,11 @@ , cmake , dbus , dbus-test-runner +, doxygen , pkg-config , qtbase , qtdeclarative +, qttools , validatePkgConfig }: @@ -26,20 +28,27 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" + "doc" ]; postPatch = '' # Queries QMake for broken Qt variable: '/build/qtbase-/$(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}")' + + # Fix section labels + substituteInPlace documentation/qml/pages/* \ + --replace-warn '\part' '\section1' ''; strictDeps = true; nativeBuildInputs = [ cmake + doxygen pkg-config qtdeclarative + qttools # qdoc validatePkgConfig ]; @@ -57,8 +66,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "ENABLE_TESTING" finalAttrs.finalPackage.doCheck) # 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) + (lib.cmakeBool "GENERATE_DOCUMENTATION" true) ]; dontWrapQtApps = true; From d04843ce6096f2128fdd996bae44b257f9f32550 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:08:29 +0100 Subject: [PATCH 04/14] lomiri.lomiri-ui-toolkit: Enable qdoc docs --- pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix b/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix index 8767534d368f..c0f9547a8092 100644 --- a/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix +++ b/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix @@ -21,6 +21,7 @@ , qtquickcontrols2 , qtsvg , qtsystems +, qttools , suru-icon-theme , validatePkgConfig , wrapQtAppsHook @@ -43,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-r+wUCl+ywFcgFYo7BjBoXiulQptd1Zd3LJchXiMtx4I="; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "doc" ]; patches = [ ./2001-Mark-problematic-tests.patch @@ -67,6 +68,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 +110,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config python3 qmake + qttools # qdoc, qhelpgenerator validatePkgConfig wrapQtAppsHook ]; @@ -133,8 +139,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"}" From e0d5bd98ffbcead17660720baa782ceead262455 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:18:59 +0100 Subject: [PATCH 05/14] lomiri.lomiri-download-manager: Enable qdoc docs --- .../lomiri/services/lomiri-download-manager/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix b/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix index 6174bd9c54b0..b666b37d1e29 100644 --- a/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix @@ -9,8 +9,7 @@ , cmake-extras , dbus , dbus-test-runner -# Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379 -, withDocumentation ? false +, withDocumentation ? true , doxygen , glog , graphviz @@ -20,6 +19,7 @@ , python3 , qtbase , qtdeclarative +, qttools , validatePkgConfig , wrapQtAppsHook , xvfb-run @@ -77,6 +77,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals withDocumentation [ doxygen graphviz + qttools # qdoc ]; buildInputs = [ From 03b310e94cbcaedecc1524f2597c8c990bcf2b60 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:28:40 +0100 Subject: [PATCH 06/14] lomiri.lomiri-indicator-network: Enable qdoc docs --- .../lomiri/services/lomiri-indicator-network/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix b/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix index 41d5e81611e4..58ca6d208779 100644 --- a/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix @@ -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; From 8a5f86237dbad261bd629c8bc391536b7194f1e5 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:33:15 +0100 Subject: [PATCH 07/14] lomiri.lomiri-content-hub: Enable qdoc docs --- pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix index dd2f6d3ab23e..d11f193447e3 100644 --- a/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix @@ -22,6 +22,7 @@ , qtdeclarative , qtfeedback , qtgraphicaleffects +, qttools , validatePkgConfig , wrapGAppsHook3 , xvfb-run @@ -41,6 +42,7 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" "dev" + "doc" "examples" ]; @@ -64,6 +66,7 @@ stdenv.mkDerivation (finalAttrs: { gettext pkg-config qtdeclarative # qmlplugindump + qttools # qdoc validatePkgConfig wrapGAppsHook3 ]; @@ -100,7 +103,7 @@ 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 ]; From b8c432b54a5a219964b53763caab57378e3aabcc Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:44:18 +0100 Subject: [PATCH 08/14] libsForQt5.accounts-qml-module: nixfmt, modernise --- .../libraries/accounts-qml-module/default.nix | 66 +++++++++++-------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/pkgs/development/libraries/accounts-qml-module/default.nix b/pkgs/development/libraries/accounts-qml-module/default.nix index cf0a5b7e8d0b..ff0652eab9c9 100644 --- a/pkgs/development/libraries/accounts-qml-module/default.nix +++ b/pkgs/development/libraries/accounts-qml-module/default.nix @@ -1,15 +1,17 @@ -{ stdenv -, lib -, fetchFromGitLab -, accounts-qt -, dbus-test-runner -, pkg-config -, qmake -, qtbase -, qtdeclarative -, qttools -, signond -, xvfb-run +{ + stdenv, + lib, + fetchFromGitLab, + unstableGitUpdater, + accounts-qt, + dbus-test-runner, + pkg-config, + qmake, + qtbase, + qtdeclarative, + qttools, + signond, + xvfb-run, }: stdenv.mkDerivation (finalAttrs: { @@ -28,21 +30,23 @@ stdenv.mkDerivation (finalAttrs: { "doc" ]; - postPatch = '' - substituteInPlace src/src.pro \ - --replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \ - --replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}' + 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' + # 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' - ''; + # 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; @@ -88,11 +92,15 @@ stdenv.mkDerivation (finalAttrs: { moveToOutput share/accounts-qml-module/doc $doc ''; - meta = with lib; { + 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; }; }) From bafb37491e96a52be0f7aeaedfe97722bf55e153 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:46:56 +0100 Subject: [PATCH 09/14] libsForQt5.accounts-qml-module: Fix version Year was typo'd, should be 2023 --- pkgs/development/libraries/accounts-qml-module/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/accounts-qml-module/default.nix b/pkgs/development/libraries/accounts-qml-module/default.nix index ff0652eab9c9..2ac4663652f9 100644 --- a/pkgs/development/libraries/accounts-qml-module/default.nix +++ b/pkgs/development/libraries/accounts-qml-module/default.nix @@ -16,7 +16,7 @@ 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"; From 95c0233ed9624a7748fa76d4ee29777e1ca0f83e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:49:44 +0100 Subject: [PATCH 10/14] lomiri.lomiri-action-api: nixfmt, modernise --- .../lomiri/qml/lomiri-action-api/default.nix | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix b/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix index 20e8fe9f239d..8493e89f8f15 100644 --- a/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix +++ b/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix @@ -1,17 +1,18 @@ -{ stdenv -, lib -, fetchFromGitLab -, gitUpdater -, testers -, cmake -, dbus -, dbus-test-runner -, doxygen -, pkg-config -, qtbase -, qtdeclarative -, qttools -, validatePkgConfig +{ + stdenv, + lib, + fetchFromGitLab, + gitUpdater, + testers, + cmake, + dbus, + dbus-test-runner, + doxygen, + pkg-config, + qtbase, + qtdeclarative, + qttools, + validatePkgConfig, }: stdenv.mkDerivation (finalAttrs: { @@ -34,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' # Queries QMake for broken Qt variable: '/build/qtbase-/$(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/* \ @@ -64,9 +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) - (lib.cmakeBool "GENERATE_DOCUMENTATION" true) ]; dontWrapQtApps = true; @@ -90,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" ]; }; }) From ba59f61a725a46e2d2348929b60eac263a4b6dee Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:51:48 +0100 Subject: [PATCH 11/14] lomiri.u1db-qt: Add meta.changelog --- pkgs/desktops/lomiri/development/u1db-qt/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/desktops/lomiri/development/u1db-qt/default.nix b/pkgs/desktops/lomiri/development/u1db-qt/default.nix index 536b4f9c78dd..9e8d6b20f295 100644 --- a/pkgs/desktops/lomiri/development/u1db-qt/default.nix +++ b/pkgs/desktops/lomiri/development/u1db-qt/default.nix @@ -103,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; From 5cc3c54a642596d2b15666fd0ccb11590448c92d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:53:55 +0100 Subject: [PATCH 12/14] lomiri.lomiri-ui-toolkit: nixfmt, modernise --- .../lomiri/qml/lomiri-ui-toolkit/default.nix | 87 +++++++++++-------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix b/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix index c0f9547a8092..d0bedb67bd52 100644 --- a/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix +++ b/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix @@ -1,37 +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 -, qttools -, 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"; @@ -44,10 +53,15 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-r+wUCl+ywFcgFYo7BjBoXiulQptd1Zd3LJchXiMtx4I="; }; - outputs = [ "out" "dev" "doc" ]; + 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"; @@ -205,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. @@ -223,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" From 4ce2e1df58eca6a7e0358a8efc5b0ebb4373760c Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 13:58:46 +0100 Subject: [PATCH 13/14] lomiri.lomiri-download-manager: nixfmt, modernise --- .../lomiri-download-manager/default.nix | 95 +++++++++---------- 1 file changed, 45 insertions(+), 50 deletions(-) diff --git a/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix b/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix index b666b37d1e29..acd5647a625d 100644 --- a/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix @@ -1,28 +1,29 @@ -{ 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, + 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,16 +68,18 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; - nativeBuildInputs = [ - cmake - pkg-config - validatePkgConfig - wrapQtAppsHook - ] ++ lib.optionals withDocumentation [ - doxygen - graphviz - qttools # qdoc - ]; + nativeBuildInputs = + [ + cmake + pkg-config + validatePkgConfig + wrapQtAppsHook + ] + ++ lib.optionals withDocumentation [ + doxygen + graphviz + qttools # qdoc + ]; buildInputs = [ boost @@ -96,9 +97,7 @@ stdenv.mkDerivation (finalAttrs: { xvfb-run ]; - checkInputs = [ - gtest - ]; + checkInputs = [ gtest ]; cmakeFlags = [ (lib.cmakeBool "ENABLE_DOC" withDocumentation) @@ -107,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; @@ -128,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" From 4d8081767bc55754d1321d9d10b0ff2d333178c8 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 31 Oct 2024 14:01:02 +0100 Subject: [PATCH 14/14] lomiri.lomiri-content-hub: nixfmt, modernise --- .../services/lomiri-content-hub/default.nix | 90 +++++++++++-------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix index d11f193447e3..a2bb44340024 100644 --- a/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix @@ -1,31 +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 -, qttools -, 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: { @@ -93,9 +94,7 @@ stdenv.mkDerivation (finalAttrs: { xvfb-run ]; - checkInputs = [ - gtest - ]; + checkInputs = [ gtest ]; dontWrapQtApps = true; @@ -107,13 +106,23 @@ stdenv.mkDerivation (finalAttrs: { (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; @@ -148,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;