lomiri-qt6.lomiri-content-hub: init at 2.2.2
This commit is contained in:
@@ -38,6 +38,10 @@ let
|
||||
lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { };
|
||||
|
||||
#### Services
|
||||
lomiri-content-hub = callPackage ./services/lomiri-content-hub {
|
||||
# Check for working qdoc: not found
|
||||
withDocumentation = !useQt6;
|
||||
};
|
||||
lomiri-download-manager = callPackage ./services/lomiri-download-manager {
|
||||
# Check for working qdoc: not found
|
||||
withDocumentation = !useQt6;
|
||||
@@ -80,7 +84,6 @@ let
|
||||
|
||||
#### Services
|
||||
biometryd = callPackage ./services/biometryd { };
|
||||
lomiri-content-hub = callPackage ./services/lomiri-content-hub { };
|
||||
hfd-service = callPackage ./services/hfd-service { };
|
||||
lomiri-history-service = callPackage ./services/lomiri-history-service { };
|
||||
lomiri-indicator-datetime = ayatana-indicator-datetime.override { enableLomiriFeatures = true; };
|
||||
|
||||
@@ -23,14 +23,18 @@
|
||||
properties-cpp,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtfeedback,
|
||||
qtgraphicaleffects,
|
||||
qtfeedback ? null,
|
||||
qtgraphicaleffects ? null,
|
||||
qttools,
|
||||
validatePkgConfig,
|
||||
wrapGAppsHook3,
|
||||
xvfb-run,
|
||||
withDocumentation ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
withQt6 = lib.strings.versionAtLeast qtbase.version "6";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-content-hub";
|
||||
version = "2.2.2";
|
||||
@@ -45,8 +49,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
"doc"
|
||||
"examples"
|
||||
]
|
||||
++ lib.optionals withDocumentation [
|
||||
"doc"
|
||||
];
|
||||
|
||||
patches = [
|
||||
@@ -69,6 +75,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Don't override default theme search path (which honours XDG_DATA_DIRS) with a FHS assumption
|
||||
substituteInPlace import/Lomiri/Content/contenthubplugin.cpp \
|
||||
--replace-fail 'QIcon::setThemeSearchPaths(QStringList() << ("/usr/share/icons/"));' ""
|
||||
''
|
||||
# Need QtQuick.Window on QML2_IMPORT_PATH
|
||||
+ ''
|
||||
substituteInPlace tests/qml6-tests/CMakeLists.txt \
|
||||
--replace-fail 'QML2_IMPORT_PATH=' 'QML2_IMPORT_PATH=${lib.getBin qtdeclarative}/${qtbase.qtQmlPrefix}:'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
@@ -78,9 +89,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
gettext
|
||||
pkg-config
|
||||
qtdeclarative # qmlplugindump
|
||||
qttools # qdoc
|
||||
validatePkgConfig
|
||||
wrapGAppsHook3
|
||||
]
|
||||
++ lib.optionals withDocumentation [
|
||||
qttools # qdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -96,8 +109,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
properties-cpp
|
||||
qtbase
|
||||
qtdeclarative
|
||||
qtfeedback
|
||||
]
|
||||
++ lib.optionals (!withQt6) [
|
||||
# Deprecated in Qt6
|
||||
qtgraphicaleffects
|
||||
|
||||
# Will prolly want this in the future, but needs porting to Qt6
|
||||
qtfeedback
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@@ -112,11 +130,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "GSETTINGS_COMPILE" true)
|
||||
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
|
||||
(lib.cmakeBool "ENABLE_QT6" (lib.strings.versionAtLeast qtbase.version "6"))
|
||||
(lib.cmakeBool "ENABLE_QT6" withQt6)
|
||||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeBool "ENABLE_DOC" true)
|
||||
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # in case something still depends on it
|
||||
(lib.cmakeBool "ENABLE_WERROR" true)
|
||||
(lib.cmakeBool "ENABLE_DOC" withDocumentation)
|
||||
# in case something still depends on it
|
||||
# no longer available in the Qt6 build
|
||||
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" (!withQt6))
|
||||
(lib.cmakeBool "ENABLE_WERROR" (!withQt6)) # Known issues on Qt6
|
||||
];
|
||||
|
||||
preBuild =
|
||||
@@ -128,12 +148,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Executes qmlplugindump
|
||||
export QT_PLUGIN_PATH=${listToQtVar [ qtbase ] qtbase.qtPluginPrefix}
|
||||
export QML2_IMPORT_PATH=${
|
||||
listToQtVar [
|
||||
qtdeclarative
|
||||
lomiri-ui-toolkit
|
||||
qtfeedback
|
||||
qtgraphicaleffects
|
||||
] qtbase.qtQmlPrefix
|
||||
listToQtVar (
|
||||
[
|
||||
qtdeclarative
|
||||
lomiri-ui-toolkit
|
||||
]
|
||||
++ lib.optionals (!withQt6) [
|
||||
# Deprecated in Qt6
|
||||
qtgraphicaleffects
|
||||
|
||||
# Will prolly want this in the future, but needs porting to Qt6
|
||||
qtfeedback
|
||||
]
|
||||
) qtbase.qtQmlPrefix
|
||||
}
|
||||
'';
|
||||
|
||||
@@ -160,6 +187,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
passthru = {
|
||||
tests = {
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
}
|
||||
// lib.optionalAttrs (!withQt6) {
|
||||
# Tests content-hub functionality, up to the point where one app receives a content exchange request
|
||||
# from another and changes into a mode to pick the content to send
|
||||
vm = nixosTests.lomiri.desktop-appinteractions;
|
||||
@@ -183,7 +212,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
teams = [ lib.teams.lomiri ];
|
||||
platforms = lib.platforms.linux;
|
||||
pkgConfigModules = [
|
||||
"liblomiri-content-hub"
|
||||
"liblomiri-content-hub${lib.optionalString withQt6 "-qt6"}"
|
||||
"liblomiri-content-hub-glib"
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user