lomiri.lomiri-content-hub: Rename from lomiri.content-hub, 1.1.1 -> 2.0.0

This commit is contained in:
OPNA2608 2024-09-16 13:04:27 +02:00
parent ed897d230a
commit 6037708c33
12 changed files with 72 additions and 99 deletions

View File

@ -16,7 +16,6 @@ in {
libayatana-common
ubports-click
]) ++ (with pkgs.lomiri; [
content-hub
hfd-service
history-service
libusermetrics
@ -24,6 +23,7 @@ in {
lomiri-calculator-app
lomiri-camera-app
lomiri-clock-app
lomiri-content-hub
lomiri-docviewer-app
lomiri-download-manager
lomiri-filemanager-app
@ -129,7 +129,7 @@ in {
environment.pathsToLink = [
# Configs for inter-app data exchange system
"/share/content-hub/peers"
"/share/lomiri-content-hub/peers"
# Configs for inter-app URL requests
"/share/lomiri-url-dispatcher/urls"
# Splash screens & other images for desktop apps launched via lomiri-app-launch
@ -194,10 +194,6 @@ in {
};
users.groups.usermetrics = { };
# TODO content-hub cannot pass files between applications without asking AA for permissions. And alot of the Lomiri stack is designed with AA availability in mind. This might be a requirement to be closer to upstream?
# But content-hub currently fails to pass files between applications even with AA enabled, and we can get away without AA in many places. Let's see how this develops before requiring this for good.
# security.apparmor.enable = true;
};
meta.maintainers = lib.teams.lomiri.members;

View File

@ -360,13 +360,13 @@ in
};
variables = {
# So we can test what content-hub is working behind the scenes
CONTENT_HUB_LOGGING_LEVEL = "2";
# So we can test what lomiri-content-hub is working behind the scenes
LOMIRI_CONTENT_HUB_LOGGING_LEVEL = "2";
};
systemPackages = with pkgs; [
# For a convenient way of kicking off content-hub peer collection
lomiri.content-hub.examples
# For a convenient way of kicking off lomiri-content-hub peer collection
lomiri.lomiri-content-hub.examples
];
};
@ -484,9 +484,9 @@ in
# lomiri-terminal-app has a separate VM test to test its basic functionality
# for the LSS content-hub test to work reliably, we need to kick off peer collecting
machine.send_chars("content-hub-test-importer\n")
wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub
# for the LSS lomiri-content-hub test to work reliably, we need to kick off peer collecting
machine.send_chars("lomiri-content-hub-test-importer\n")
wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from lomiri-content-hub
machine.send_key("ctrl-c")
# Doing this here, since we need an in-session shell & separately starting a terminal again wastes time
@ -510,7 +510,7 @@ in
wait_for_text("Rotation Lock")
machine.screenshot("settings_open")
# lomiri-system-settings has a separate VM test, only test Lomiri-specific content-hub functionalities here
# lomiri-system-settings has a separate VM test, only test Lomiri-specific lomiri-content-hub functionalities here
# Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio
toggle_maximise()
@ -536,7 +536,7 @@ in
# Peers should be loaded
wait_for_text("Morph") # or Gallery, but Morph is already packaged
machine.screenshot("settings_content-hub_peers")
machine.screenshot("settings_lomiri-content-hub_peers")
# Select Morph as content source
mouse_click(370, 100)
@ -544,11 +544,11 @@ in
# Expect Morph to be brought into the foreground, with its Downloads page open
wait_for_text("No downloads")
# If content-hub encounters a problem, it may have crashed the original application issuing the request.
# If lomiri-content-hub encounters a problem, it may have crashed the original application issuing the request.
# Check that it's still alive
machine.succeed("pgrep -u ${user} -f lomiri-system-settings")
machine.screenshot("content-hub_exchange")
machine.screenshot("lomiri-content-hub_exchange")
# Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign
machine.send_key("esc")

View File

@ -6,12 +6,12 @@
gitUpdater,
nixosTests,
cmake,
content-hub,
exiv2,
gettext,
gst_all_1,
libusermetrics,
lomiri-action-api,
lomiri-content-hub,
lomiri-ui-toolkit,
lomiri-thumbnailer,
pkg-config,
@ -145,9 +145,9 @@ stdenv.mkDerivation (finalAttrs: {
qzxing
# QML
content-hub
libusermetrics
lomiri-action-api
lomiri-content-hub
lomiri-ui-toolkit
lomiri-thumbnailer
qtpositioning
@ -192,7 +192,7 @@ stdenv.mkDerivation (finalAttrs: {
export QML2_IMPORT_PATH=${
listToQtVar qtbase.qtQmlPrefix [
lomiri-ui-toolkit
content-hub
lomiri-content-hub
lomiri-thumbnailer
]
}
@ -203,7 +203,7 @@ stdenv.mkDerivation (finalAttrs: {
ln -s $out/share/lomiri-camera-app/assets/lomiri-camera-app-splash.svg $out/share/lomiri-app-launch/splash/lomiri-camera-app.svg
ln -s $out/share/lomiri-camera-app/assets/lomiri-barcode-reader-app-splash.svg $out/share/lomiri-app-launch/splash/lomiri-barcode-reader-app.svg
install -Dm644 ../camera-contenthub.json $out/share/content-hub/peers/lomiri-camera-app
install -Dm644 ../camera-contenthub.json $out/share/lomiri-content-hub/peers/lomiri-camera-app
'';
dontWrapGApps = true;

View File

@ -6,10 +6,10 @@
gitUpdater,
nixosTests,
cmake,
content-hub,
geonames,
gettext,
libusermetrics,
lomiri-content-hub,
lomiri-sounds,
lomiri-ui-toolkit,
makeWrapper,
@ -124,8 +124,8 @@ stdenv.mkDerivation (finalAttrs: {
qtbase
# QML
content-hub
libusermetrics
lomiri-content-hub
lomiri-ui-toolkit
qtdeclarative
qtmultimedia
@ -172,7 +172,7 @@ stdenv.mkDerivation (finalAttrs: {
export QML2_IMPORT_PATH=${
listToQtVar qtbase.qtQmlPrefix (
[
content-hub
lomiri-content-hub
lomiri-ui-toolkit
qtmultimedia
u1db-qt

View File

@ -7,9 +7,9 @@
gitUpdater,
nixosTests,
cmake,
content-hub,
gettext,
libreoffice-unwrapped,
lomiri-content-hub,
lomiri-ui-toolkit,
pkg-config,
poppler,
@ -84,11 +84,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-KdHyKXM0hMMIFkuDn5JZJOEuitWAXT2QQOuR+1AolP0=";
})
# Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/77 merged & in release
# Remove when version > 3.0.4
(fetchpatch {
name = "1051-lomiri-docviewer-app-Install-content-hub-lomiri-url-dispatcher-files.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/98f5ab9d51ba05e8c3ed1991c0b67d3922b5ba90.patch";
hash = "sha256-JA26ga1CNOdbis87lSzqbUbs94Oc1vlxraXZxx3dsu8=";
url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/d6731f6d00050b42d561d63ae91751761f7fd278.patch";
hash = "sha256-EFuQ+pMI8fwYM0lgapi/XeAagFbXUzLWzAx0bPkEdzA=";
})
];
@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
qtdeclarative
# QML
content-hub
lomiri-content-hub
lomiri-ui-toolkit
qtsystems
];

View File

@ -7,8 +7,8 @@
nixosTests,
biometryd,
cmake,
content-hub,
gettext,
lomiri-content-hub,
lomiri-thumbnailer,
lomiri-ui-extras,
lomiri-ui-toolkit,
@ -103,7 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
# QML
biometryd
content-hub
lomiri-content-hub
lomiri-thumbnailer
lomiri-ui-extras
lomiri-ui-toolkit
@ -119,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
# Some misc files don't get installed to the correct paths for us
mkdir -p $out/share/{content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash}
ln -s $out/share/lomiri-filemanager-app/content-hub.json $out/share/content-hub/peers/lomiri-filemanager-app
mkdir -p $out/share/{lomiri-content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash}
ln -s $out/share/lomiri-filemanager-app/content-hub.json $out/share/lomiri-content-hub/peers/lomiri-filemanager-app
ln -s $out/share/lomiri-filemanager-app/filemanager.svg $out/share/icons/hicolor/scalable/apps/lomiri-filemanager-app.svg
ln -s $out/share/lomiri-filemanager-app/splash.svg $out/share/lomiri-app-launch/splash/lomiri-filemanager-app.svg
'';

View File

@ -6,11 +6,11 @@
gitUpdater,
nixosTests,
cmake,
content-hub,
exiv2,
imagemagick,
libglvnd,
libmediainfo,
lomiri-content-hub,
lomiri-thumbnailer,
lomiri-ui-extras,
lomiri-ui-toolkit,
@ -88,6 +88,18 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/90a79972741ee0c5dc734dba6c42afeb3ee6a699.patch";
hash = "sha256-YAmH0he5/rZYKWFyPzUFAKJuHhUTxB3q8zbLL7Spz/c=";
})
# Remove when version >= 3.1.0
(fetchpatch {
name = "0101-lomiri-gallery-app-Updated-content-hub-peer-name.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/9a3376760ea6825d9915262264f98d7faf94bf81.patch";
hash = "sha256-aKRtKUNDhQNJPW5MkohXw1lTnKvZwz4LnRMqp2pKMpU=";
})
(fetchpatch {
name = "0102-lomiri-gallery-app-lomiri-content-hub-rename.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/cb6eb0ffdf8d67de97572450447df277ce56a226.patch";
hash = "sha256-32QNWmZU1DmXeGkwYUH4g4nPMkYId9k6IdOKm+KfSuE=";
})
];
postPatch = ''
@ -130,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: {
qtsvg
# QML
content-hub
lomiri-content-hub
lomiri-thumbnailer
lomiri-ui-extras
lomiri-ui-toolkit
@ -164,9 +176,6 @@ stdenv.mkDerivation (finalAttrs: {
# Link splash to splash dir
mkdir -p $out/share/lomiri-app-launch/splash
ln -s $out/share/{lomiri-gallery-app/lomiri-gallery-app-splash.svg,lomiri-app-launch/splash/lomiri-gallery-app.svg}
# Old name
mv $out/share/content-hub/peers/{,lomiri-}gallery-app
'';
passthru = {

View File

@ -9,7 +9,6 @@
biometryd,
cmake,
cmake-extras,
content-hub,
dbus,
deviceinfo,
geonames,
@ -24,6 +23,7 @@
libqofono,
libqtdbustest,
libqtdbusmock,
lomiri-content-hub,
lomiri-indicator-network,
lomiri-schemas,
lomiri-settings-components,
@ -122,8 +122,8 @@ stdenv.mkDerivation (finalAttrs: {
propagatedBuildInputs = [
ayatana-indicator-datetime
biometryd
content-hub
libqofono
lomiri-content-hub
lomiri-indicator-network
lomiri-schemas
lomiri-settings-components

View File

@ -5,10 +5,10 @@
, gitUpdater
, nixosTests
, cmake
, content-hub
, gettext
, libapparmor
, lomiri-action-api
, lomiri-content-hub
, lomiri-ui-extras
, lomiri-ui-toolkit
, pkg-config
@ -50,6 +50,13 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/0527a1e01fb27c62f5e0011274f73bad400e9691.patch";
hash = "sha256-zx/pP72uNqAi8TZR4bKeONuqcJyK/vGtPglTA+5R5no=";
})
# Remove when https://gitlab.com/ubports/development/core/morph-browser/-/merge_requests/580 merged & in release
(fetchpatch {
name = "0003-morph-browser-lomiri-content-hub-rename.patch";
url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/29e5031a1fd0aa69587724b25772ae78d6d2bd7d.patch";
hash = "sha256-nxOaiRSKi+Nb0JLopi0UNvpnctjkPkjhaHLAWPHRfQA=";
})
];
postPatch = ''
@ -84,8 +91,8 @@ stdenv.mkDerivation (finalAttrs: {
qtwebengine
# QML
content-hub
lomiri-action-api
lomiri-content-hub
lomiri-ui-extras
lomiri-ui-toolkit
qqc2-suru-style

View File

@ -7,8 +7,8 @@
gitUpdater,
nixosTests,
cmake,
content-hub,
intltool,
lomiri-content-hub,
lomiri-indicator-network,
lomiri-push-qml,
lomiri-thumbnailer,
@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
content-hub
lomiri-content-hub
lomiri-indicator-network
lomiri-push-qml
lomiri-thumbnailer
@ -102,10 +102,10 @@ stdenv.mkDerivation (finalAttrs: {
];
postInstall = ''
mkdir -p $out/share/{applications,content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash,lomiri-url-dispatcher/urls}
mkdir -p $out/share/{applications,lomiri-content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash,lomiri-url-dispatcher/urls}
ln -s $out/share/teleports/teleports.desktop $out/share/applications/teleports.desktop
ln -s $out/share/teleports/teleports.content-hub $out/share/content-hub/peers/teleports
ln -s $out/share/teleports/teleports.content-hub $out/share/lomiri-content-hub/peers/teleports
ln -s $out/share/teleports/assets/icon.svg $out/share/icons/hicolor/scalable/apps/teleports.svg
ln -s $out/share/teleports/assets/splash.svg $out/share/lomiri-app-launch/splash/teleports.svg
ln -s $out/share/teleports/teleports.url-dispatcher $out/share/lomiri-url-dispatcher/urls/teleports.url-dispatcher

View File

@ -56,7 +56,7 @@ let
#### Services
biometryd = callPackage ./services/biometryd { };
content-hub = callPackage ./services/content-hub { };
lomiri-content-hub = callPackage ./services/lomiri-content-hub { };
hfd-service = callPackage ./services/hfd-service { };
history-service = callPackage ./services/history-service { };
lomiri-download-manager = callPackage ./services/lomiri-download-manager { };
@ -70,5 +70,6 @@ let
in
lib.makeScope libsForQt5.newScope packages
// lib.optionalAttrs config.allowAliases {
content-hub = lib.warn "`content-hub` was renamed to `lomiri-content-hub`." pkgs.lomiri.lomiri-content-hub; # Added on 2024-09-11
lomiri-system-settings-security-privacy = lib.warn "`lomiri-system-settings-security-privacy` upstream was merged into `lomiri-system-settings`. Please use `pkgs.lomiri.lomiri-system-settings-unwrapped` if you need to directly access the plugins that belonged to this project." pkgs.lomiri.lomiri-system-settings-unwrapped; # Added on 2024-08-08
}

View File

@ -1,8 +1,6 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, fetchpatch2
, gitUpdater
, testers
, cmake
@ -30,14 +28,14 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "content-hub";
version = "1.1.1";
pname = "lomiri-content-hub";
version = "2.0.0";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/content-hub";
repo = "development/core/lomiri-content-hub";
rev = finalAttrs.version;
hash = "sha256-sQeyJV+Wc6PHKGIefl/dfU06XqTdICsn+Xamjx3puiI=";
hash = "sha256-eA5oCoAZB7fWyWm0Sy6wXh0EW+h76bdfJ2dotr7gUC0=";
};
outputs = [
@ -46,44 +44,6 @@ stdenv.mkDerivation (finalAttrs: {
"examples"
];
patches = [
# Remove when version > 1.1.1
(fetchpatch {
name = "0001-content-hub-Migrate-to-GetConnectionCredentials.patch";
url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/9ec9df32f77383eec7994d8e3e6961531bc8464d.patch";
hash = "sha256-14dZosMTMa1FDGEMuil0r1Hz6vn+L9XC83NMAqC7Ol8=";
})
# Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/34 merged & in release
(fetchpatch {
name = "0002-content-hub-import-Lomiri-Content-CMakeLists-Drop-qt-argument-to-qmlplugindump.patch";
url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/63a4baf1469de31c4fd50c69ed85d061f5e8e80a.patch";
hash = "sha256-T+6T9lXne6AhDFv9d7L8JNwdl8f0wjDmvSoNVPkHza4=";
})
# Remove when version > 1.1.1
# fetchpatch2 due to renames, https://github.com/NixOS/nixpkgs/issues/32084
(fetchpatch2 {
name = "0003-content-hub-Add-more-better-GNUInstallDirs-variables-usage.patch";
url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/3c5ca4a8ec125e003aca78c14521b70140856c25.patch";
hash = "sha256-kYN0eLwMyM/9yK+zboyEsoPKZMZ4SCXodVYsvkQr2F8=";
})
# Remove when version > 1.1.1
(fetchpatch {
name = "0004-content-hub-Fix-generation-of-transfer_files-and-moc_test_harness.patch";
url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/68899c75e77e1f34176b8a550d52794413e5070f.patch";
hash = "sha256-HAxePnzY/cL2c+o+Aw2N1pdr8rsbHGmRsH2EQkrBcHg=";
})
# Remove when https://gitlab.com/ubports/development/core/lomiri-content-hub/-/merge_requests/40 merged & in release
(fetchpatch {
name = "0006-content-hub-Fix-AppArmor-less-transfer.patch";
url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/b58e5c8babf00ad7c402555c96254ce0165adb9e.patch";
hash = "sha256-a7x/0NiUBmmFlq96jkHyLCL0f5NIFh5JR/H+FQ/2GqI=";
})
];
postPatch = ''
substituteInPlace import/*/Content/CMakeLists.txt \
--replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
@ -163,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: {
moveToOutput share/applications/$exampleExe.desktop $examples
done
moveToOutput share/icons $examples
moveToOutput share/content-hub/peers $examples
moveToOutput share/lomiri-content-hub/peers $examples
'';
postFixup = ''
@ -178,20 +138,20 @@ stdenv.mkDerivation (finalAttrs: {
};
meta = {
description = "Content sharing/picking service";
description = "Content sharing/picking service for the Lomiri desktop";
longDescription = ''
content-hub is a mediation service to let applications share content between them,
lomiri-content-hub is a mediation service to let applications share content between them,
even if they are not running at the same time.
'';
homepage = "https://gitlab.com/ubports/development/core/content-hub";
changelog = "https://gitlab.com/ubports/development/core/content-hub/-/blob/${finalAttrs.version}/ChangeLog";
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 ];
mainProgram = "content-hub-service";
mainProgram = "lomiri-content-hub-service";
maintainers = lib.teams.lomiri.members;
platforms = lib.platforms.linux;
pkgConfigModules = [
"libcontent-hub"
"libcontent-hub-glib"
"liblomiri-content-hub"
"liblomiri-content-hub-glib"
];
};
})