Merge pull request #332220 from OPNA2608/update/lomiri/OTA-5
lomiri.*: OTA-5
This commit is contained in:
commit
5244f79d35
@ -1,7 +1,8 @@
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
@ -32,25 +33,26 @@ in
|
||||
environment = {
|
||||
systemPackages = cfg.packages;
|
||||
|
||||
pathsToLink = [
|
||||
"/share/ayatana"
|
||||
];
|
||||
pathsToLink = [ "/share/ayatana" ];
|
||||
};
|
||||
|
||||
# libayatana-common's ayatana-indicators.target with explicit Wants & Before to bring up requested indicator services
|
||||
systemd.user.targets."ayatana-indicators" =
|
||||
systemd.user.targets =
|
||||
let
|
||||
indicatorServices = lib.lists.flatten
|
||||
(map
|
||||
(pkg:
|
||||
(map (ind: "${ind}.service") pkg.passthru.ayatana-indicators))
|
||||
cfg.packages);
|
||||
indicatorServices = lib.lists.flatten (
|
||||
map (pkg: (map (ind: "${ind}.service") pkg.passthru.ayatana-indicators)) cfg.packages
|
||||
);
|
||||
in
|
||||
{
|
||||
description = "Target representing the lifecycle of the Ayatana Indicators. Each indicator should be bound to it in its individual service file";
|
||||
lib.attrsets.mapAttrs
|
||||
(_: desc: {
|
||||
description = "Target representing the lifecycle of the ${desc}. Each indicator should be bound to it in its individual service file";
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wants = indicatorServices;
|
||||
before = indicatorServices;
|
||||
})
|
||||
{
|
||||
ayatana-indicators = "Ayatana Indicators";
|
||||
lomiri-indicators = "Ayatana/Lomiri Indicators that shall be run in Lomiri";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -537,7 +537,7 @@ in {
|
||||
lxd = pkgs.recurseIntoAttrs (handleTest ./lxd { inherit handleTestOn; });
|
||||
lxd-image-server = handleTest ./lxd-image-server.nix {};
|
||||
#logstash = handleTest ./logstash.nix {};
|
||||
lomiri = handleTest ./lomiri.nix {};
|
||||
lomiri = discoverTests (import ./lomiri.nix);
|
||||
lomiri-calculator-app = runTest ./lomiri-calculator-app.nix;
|
||||
lomiri-camera-app = runTest ./lomiri-camera-app.nix;
|
||||
lomiri-clock-app = runTest ./lomiri-clock-app.nix;
|
||||
|
@ -1,24 +1,103 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }: let
|
||||
let
|
||||
makeTest = import ./make-test-python.nix;
|
||||
# Just to make sure everything is the same, need it for OCR & navigating greeter
|
||||
user = "alice";
|
||||
description = "Alice Foobar";
|
||||
password = "foobar";
|
||||
in {
|
||||
name = "lomiri";
|
||||
in
|
||||
{
|
||||
greeter = makeTest (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "lomiri-greeter";
|
||||
|
||||
meta = {
|
||||
maintainers = lib.teams.lomiri.members;
|
||||
};
|
||||
|
||||
nodes.machine = { config, ... }: {
|
||||
imports = [
|
||||
./common/user-account.nix
|
||||
];
|
||||
nodes.machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./common/user-account.nix ];
|
||||
|
||||
virtualisation.memorySize = 2047;
|
||||
|
||||
users.users.${user} = {
|
||||
inherit description password;
|
||||
};
|
||||
|
||||
services.desktopManager.lomiri.enable = lib.mkForce true;
|
||||
services.displayManager.defaultSession = lib.mkForce "lomiri";
|
||||
|
||||
# Help with OCR
|
||||
fonts.packages = [ pkgs.inconsolata ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
# Lomiri in greeter mode should work & be able to start a session
|
||||
with subtest("lomiri greeter works"):
|
||||
machine.wait_for_unit("display-manager.service")
|
||||
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
|
||||
|
||||
# Start page shows current time
|
||||
machine.wait_for_text(r"(AM|PM)")
|
||||
machine.screenshot("lomiri_greeter_launched")
|
||||
|
||||
# Advance to login part
|
||||
machine.send_key("ret")
|
||||
machine.wait_for_text("${description}")
|
||||
machine.screenshot("lomiri_greeter_login")
|
||||
|
||||
# Login
|
||||
machine.send_chars("${password}\n")
|
||||
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
|
||||
|
||||
# Output rendering from Lomiri has started when it starts printing performance diagnostics
|
||||
machine.wait_for_console_text("Last frame took")
|
||||
# Look for datetime's clock, one of the last elements to load
|
||||
machine.wait_for_text(r"(AM|PM)")
|
||||
machine.screenshot("lomiri_launched")
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
desktop = makeTest (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "lomiri-desktop";
|
||||
|
||||
meta = {
|
||||
maintainers = lib.teams.lomiri.members;
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/auto.nix
|
||||
./common/user-account.nix
|
||||
];
|
||||
|
||||
virtualisation.memorySize = 2047;
|
||||
|
||||
users.users.${user} = {
|
||||
inherit description password;
|
||||
# polkit agent test
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
test-support.displayManager.auto = {
|
||||
enable = true;
|
||||
inherit user;
|
||||
};
|
||||
|
||||
# To control mouse via scripting
|
||||
programs.ydotool.enable = true;
|
||||
|
||||
@ -74,29 +153,12 @@ in {
|
||||
|
||||
inherit (alacritty) meta;
|
||||
})
|
||||
|
||||
# Polkit requests eventually time out.
|
||||
# Keep triggering them until we signal detection success
|
||||
(writeShellApplication {
|
||||
name = "lpa-check";
|
||||
text = ''
|
||||
while [ ! -f /tmp/lpa-checked ]; do
|
||||
pkexec echo a
|
||||
done
|
||||
'';
|
||||
})
|
||||
# Signal detection success
|
||||
(writeShellApplication {
|
||||
name = "lpa-signal";
|
||||
text = ''
|
||||
touch /tmp/lpa-checked
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Help with OCR
|
||||
systemd.tmpfiles.settings = let
|
||||
systemd.tmpfiles.settings =
|
||||
let
|
||||
white = "255, 255, 255";
|
||||
black = "0, 0, 0";
|
||||
colorSection = color: {
|
||||
@ -104,26 +166,31 @@ in {
|
||||
Bold = true;
|
||||
Transparency = false;
|
||||
};
|
||||
terminalColors = pkgs.writeText "customized.colorscheme" (lib.generators.toINI {} {
|
||||
terminalColors = pkgs.writeText "customized.colorscheme" (
|
||||
lib.generators.toINI { } {
|
||||
Background = colorSection white;
|
||||
Foreground = colorSection black;
|
||||
Color2 = colorSection black;
|
||||
Color2Intense = colorSection black;
|
||||
});
|
||||
terminalConfig = pkgs.writeText "terminal.ubports.conf" (lib.generators.toINI {} {
|
||||
}
|
||||
);
|
||||
terminalConfig = pkgs.writeText "terminal.ubports.conf" (
|
||||
lib.generators.toINI { } {
|
||||
General = {
|
||||
colorScheme = "customized";
|
||||
fontSize = "16";
|
||||
fontStyle = "Inconsolata";
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
confBase = "${config.users.users.${user}.home}/.config";
|
||||
userDirArgs = {
|
||||
mode = "0700";
|
||||
user = user;
|
||||
group = "users";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
"10-lomiri-test-setup" = {
|
||||
"${confBase}".d = userDirArgs;
|
||||
"${confBase}/terminal.ubports".d = userDirArgs;
|
||||
@ -135,7 +202,9 @@ in {
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
def toggle_maximise():
|
||||
"""
|
||||
Maximise the current window.
|
||||
@ -177,26 +246,9 @@ in {
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
# Lomiri in greeter mode should work & be able to start a session
|
||||
with subtest("lomiri greeter works"):
|
||||
machine.wait_for_unit("display-manager.service")
|
||||
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
|
||||
|
||||
# Start page shows current time
|
||||
machine.wait_for_text(r"(AM|PM)")
|
||||
machine.screenshot("lomiri_greeter_launched")
|
||||
|
||||
# Advance to login part
|
||||
machine.send_key("ret")
|
||||
machine.wait_for_text("${description}")
|
||||
machine.screenshot("lomiri_greeter_login")
|
||||
|
||||
# Login
|
||||
machine.send_chars("${password}\n")
|
||||
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
|
||||
|
||||
# The session should start, and not be stuck in i.e. a crash loop
|
||||
with subtest("lomiri starts"):
|
||||
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
|
||||
# Output rendering from Lomiri has started when it starts printing performance diagnostics
|
||||
machine.wait_for_console_text("Last frame took")
|
||||
# Look for datetime's clock, one of the last elements to load
|
||||
@ -218,13 +270,17 @@ in {
|
||||
|
||||
# Doing this here, since we need an in-session shell & separately starting a terminal again wastes time
|
||||
with subtest("polkit agent works"):
|
||||
machine.send_chars("exec lpa-check\n")
|
||||
machine.wait_for_text(r"(Elevated permissions|Login)")
|
||||
machine.send_chars("pkexec touch /tmp/polkit-test\n")
|
||||
# There's an authentication notification here that gains focus, but we struggle with OCRing it
|
||||
# Just hope that it's up after a short wait
|
||||
machine.sleep(10)
|
||||
machine.screenshot("polkit_agent")
|
||||
machine.execute("lpa-signal")
|
||||
machine.send_chars("${password}")
|
||||
machine.sleep(2) # Hopefully enough delay to make sure all the password characters have been registered? Maybe just placebo
|
||||
machine.send_chars("\n")
|
||||
machine.wait_for_file("/tmp/polkit-test", 10)
|
||||
|
||||
# polkit test will quit terminal when agent request times out after OCR success
|
||||
machine.wait_until_fails("pgrep -u ${user} -f lomiri-terminal-app")
|
||||
machine.send_key("alt-f4")
|
||||
|
||||
# We want the ability to launch applications
|
||||
with subtest("starter menu works"):
|
||||
@ -307,6 +363,81 @@ in {
|
||||
|
||||
machine.sleep(2) # sleep a tiny bit so morph can close & the focus can return to LSS
|
||||
machine.send_key("alt-f4")
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
desktop-ayatana-indicators = makeTest (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "lomiri-desktop-ayatana-indicators";
|
||||
|
||||
meta = {
|
||||
maintainers = lib.teams.lomiri.members;
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/auto.nix
|
||||
./common/user-account.nix
|
||||
];
|
||||
|
||||
virtualisation.memorySize = 2047;
|
||||
|
||||
users.users.${user} = {
|
||||
inherit description password;
|
||||
};
|
||||
|
||||
test-support.displayManager.auto = {
|
||||
enable = true;
|
||||
inherit user;
|
||||
};
|
||||
|
||||
# To control mouse via scripting
|
||||
programs.ydotool.enable = true;
|
||||
|
||||
services.desktopManager.lomiri.enable = lib.mkForce true;
|
||||
services.displayManager.defaultSession = lib.mkForce "lomiri";
|
||||
|
||||
# Help with OCR
|
||||
fonts.packages = [ pkgs.inconsolata ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript =
|
||||
{ nodes, ... }:
|
||||
''
|
||||
def mouse_click(xpos, ypos):
|
||||
"""
|
||||
Move the mouse to a screen location and hit left-click.
|
||||
"""
|
||||
|
||||
# Need to reset to top-left, --absolute doesn't work?
|
||||
machine.execute("ydotool mousemove -- -10000 -10000")
|
||||
machine.sleep(2)
|
||||
|
||||
# Move
|
||||
machine.execute(f"ydotool mousemove -- {xpos} {ypos}")
|
||||
machine.sleep(2)
|
||||
|
||||
# Click (C0 - left button: down & up)
|
||||
machine.execute("ydotool click 0xC0")
|
||||
machine.sleep(2)
|
||||
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
# The session should start, and not be stuck in i.e. a crash loop
|
||||
with subtest("lomiri starts"):
|
||||
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
|
||||
# Output rendering from Lomiri has started when it starts printing performance diagnostics
|
||||
machine.wait_for_console_text("Last frame took")
|
||||
# Look for datetime's clock, one of the last elements to load
|
||||
machine.wait_for_text(r"(AM|PM)")
|
||||
machine.screenshot("lomiri_launched")
|
||||
|
||||
# The ayatana indicators are an important part of the experience, and they hold the only graphical way of exiting the session.
|
||||
# There's a test app we could use that also displays their contents, but it's abit inconsistent.
|
||||
@ -358,6 +489,8 @@ in {
|
||||
mouse_click(720, 280) # "Log Out"
|
||||
mouse_click(400, 240) # confirm logout
|
||||
machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
|
||||
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
|
||||
'';
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -27,26 +27,18 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-clock-app";
|
||||
version = "4.0.3";
|
||||
version = "4.0.4";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/apps/lomiri-clock-app";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-q/hdnwHO97bhL0W3VsdHwjPvGs6GhWbDiVLCx4NiR50=";
|
||||
hash = "sha256-IWNLMYrebYQe5otNwZtRUs4YGPo/5OFic3Nh2pWxROs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix dispatching to clock app via LUD
|
||||
# Remove when version > 4.0.3
|
||||
(fetchpatch {
|
||||
name = "0001-lomiri-clock-app-Fix-non-click-lomiri-url-dispatcher-support.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/493888b41489b360415d1a0d0e431754afdee2b0.patch";
|
||||
hash = "sha256-sI7YDrWjV0bSAq0vdSvNcWCLhmEEb10T7jd2kYfSfZU=";
|
||||
})
|
||||
|
||||
# Fix GNUInstallDirs variables usage
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/merge_requests/215 merged & in release
|
||||
# Remove when version > 4.0.4
|
||||
(fetchpatch {
|
||||
name = "0002-lomiri-clock-app-Fix-GNUInstallDirs-variable-concatenations-in-CMake.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/33c62d0382f69462de0567628d7a6ef162944e12.patch";
|
||||
@ -54,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
|
||||
# Fix installation of splash icon
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/merge_requests/216 merged & in release
|
||||
# Remove when version > 4.0.4
|
||||
(fetchpatch {
|
||||
name = "0003-lomiri-clock-app-Fix-splash-file-installation-in-non-clock-mode.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/97fd6fd91ee787dfe107bd36bc895f2ff234b5e3.patch";
|
||||
@ -85,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
|
||||
# Don't ignore PATH when looking for qmltestrunner, saves us a patch for hardcoded fallback
|
||||
# Remove when https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/merge_requests/218 merged & in release
|
||||
# Remove when version > 4.0.4
|
||||
(fetchpatch {
|
||||
name = "0008-lomiri-clock-app-tests-Drop-NO_DEFAULT_PATH.patch";
|
||||
url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/190ef47e2efaaf139920d0556e0522f95479ea95.patch";
|
||||
@ -102,10 +94,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Part of 493888b41489b360415d1a0d0e431754afdee2b0 patch, but neither fetchpatch nor fetchpatch2 can handle a rename-only change to a file
|
||||
# Remove when version > 4.0.3
|
||||
mv clock.ubports_clock.url-dispatcher lomiri-clock-app.url-dispatcher
|
||||
|
||||
# QT_IMPORTS_DIR returned by qmake -query is broken
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'qmake -query QT_INSTALL_QML' 'echo ''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}' \
|
||||
|
@ -1,57 +1,59 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, fetchpatch2
|
||||
, gitUpdater
|
||||
, testers
|
||||
, accountsservice
|
||||
, ayatana-indicator-datetime
|
||||
, cmake
|
||||
, cmake-extras
|
||||
, content-hub
|
||||
, dbus
|
||||
, deviceinfo
|
||||
, geonames
|
||||
, gettext
|
||||
, glib
|
||||
, gnome-desktop
|
||||
, gsettings-qt
|
||||
, gtk3
|
||||
, icu
|
||||
, intltool
|
||||
, json-glib
|
||||
, libqofono
|
||||
, libqtdbustest
|
||||
, libqtdbusmock
|
||||
, lomiri-indicator-network
|
||||
, lomiri-schemas
|
||||
, lomiri-settings-components
|
||||
, lomiri-ui-toolkit
|
||||
, maliit-keyboard
|
||||
, pkg-config
|
||||
, python3
|
||||
, qmenumodel
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
, qtmultimedia
|
||||
, ubports-click
|
||||
, upower
|
||||
, validatePkgConfig
|
||||
, wrapGAppsHook3
|
||||
, wrapQtAppsHook
|
||||
, xvfb-run
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
gitUpdater,
|
||||
testers,
|
||||
accountsservice,
|
||||
ayatana-indicator-datetime,
|
||||
biometryd,
|
||||
cmake,
|
||||
cmake-extras,
|
||||
content-hub,
|
||||
dbus,
|
||||
deviceinfo,
|
||||
geonames,
|
||||
gettext,
|
||||
glib,
|
||||
gnome-desktop,
|
||||
gsettings-qt,
|
||||
gtk3,
|
||||
icu,
|
||||
intltool,
|
||||
json-glib,
|
||||
libqofono,
|
||||
libqtdbustest,
|
||||
libqtdbusmock,
|
||||
lomiri-indicator-network,
|
||||
lomiri-schemas,
|
||||
lomiri-settings-components,
|
||||
lomiri-ui-toolkit,
|
||||
maliit-keyboard,
|
||||
pkg-config,
|
||||
polkit,
|
||||
python3,
|
||||
qmenumodel,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtmultimedia,
|
||||
trust-store,
|
||||
ubports-click,
|
||||
upower,
|
||||
validatePkgConfig,
|
||||
wrapGAppsHook3,
|
||||
wrapQtAppsHook,
|
||||
xvfb-run,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-system-settings-unwrapped";
|
||||
version = "1.1.0";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/lomiri-system-settings";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-Po5eArO7zyaGatTf6kqci3DdzFDJSZakeglbiMx9kR8=";
|
||||
hash = "sha256-dWaXPr9Z5jz5SbwLSd3jVqjK0E5BdcKVeF15p8j47uM=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
@ -59,55 +61,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"dev"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/433 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0001-lomiri-system-settings-plugins-language-Fix-linking-against-accountsservice.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/75763ae2f9669f5f7f29aec3566606e6f6cb7478.patch";
|
||||
hash = "sha256-2CE0yizkaz93kK82DhaaFjKmGnMoaikrwFj4k7RN534=";
|
||||
})
|
||||
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/434 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0002-lomiri-system-settings-GNUInstallDirs-and-fix-absolute-path-handling.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/93ee84423f3677a608ef73addcd3ddcbe7dc1d32.patch";
|
||||
hash = "sha256-lSKAhtE3oSSv7USvDbbcfBZWAtWMmuKneWawKQABIiM=";
|
||||
})
|
||||
|
||||
# Fixes tests with very-recent python-dbusmock
|
||||
# Remove when version > 1.1.0
|
||||
(fetchpatch {
|
||||
name = "0003-lomiri-system-settings-Revert-Pass-missing-parameter-to-dbusmock-bluez-PairDevice-function.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/67d9e28ebab8bdb9473d5bf8da2b7573e6848fa2.patch";
|
||||
hash = "sha256-pFWNne2UH3R5Fz9ayHvIpDXDQbXPs0k4b/oRg0fzi+s=";
|
||||
})
|
||||
|
||||
(fetchpatch2 {
|
||||
name = "0004-lomiri-system-settings-QOfono-namespace-change.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/c0b5b007d77993fabdd95be5ccbbba5151f0f165.patch";
|
||||
hash = "sha256-HB7qdlbY0AVG6X3hL3IHf0Z7rm1G0wfdqo5MXtY7bfE=";
|
||||
})
|
||||
] ++ [
|
||||
|
||||
./2000-Support-wrapping-for-Nixpkgs.patch
|
||||
|
||||
# Make it work with regular accountsservice
|
||||
# https://gitlab.com/ubports/development/core/lomiri-system-settings/-/issues/341
|
||||
(fetchpatch {
|
||||
name = "2001-lomiri-system-settings-disable-current-language-switching.patch";
|
||||
url = "https://sources.debian.org/data/main/l/lomiri-system-settings/1.0.1-2/debian/patches/2001_disable-current-language-switching.patch";
|
||||
hash = "sha256-ZOFYwxS8s6+qMFw8xDCBv3nLBOBm86m9d/VhbpOjamY=";
|
||||
})
|
||||
];
|
||||
patches = [ ./2000-Support-wrapping-for-Nixpkgs.patch ];
|
||||
|
||||
postPatch = ''
|
||||
# Part of 0004-lomiri-system-settings-QOfono-namespace-change.patch, fetchpatch2 cannot handle rename-only changes
|
||||
for unmovedThing in tests/mocks/MeeGo/QOfono/*; do
|
||||
mv "$unmovedThing" "tests/mocks/QOfono/$(basename "$unmovedThing")"
|
||||
done
|
||||
rmdir tests/mocks/MeeGo/QOfono
|
||||
rmdir tests/mocks/MeeGo
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" \
|
||||
|
||||
@ -155,7 +111,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
gtk3
|
||||
icu
|
||||
json-glib
|
||||
polkit
|
||||
qtbase
|
||||
trust-store
|
||||
ubports-click
|
||||
upower
|
||||
];
|
||||
@ -163,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# QML components and schemas the wrapper needs
|
||||
propagatedBuildInputs = [
|
||||
ayatana-indicator-datetime
|
||||
biometryd
|
||||
content-hub
|
||||
libqofono
|
||||
lomiri-indicator-network
|
||||
@ -177,9 +136,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeCheckInputs = [
|
||||
dbus
|
||||
(python3.withPackages (ps: with ps; [
|
||||
python-dbusmock
|
||||
]))
|
||||
(python3.withPackages (ps: with ps; [ python-dbusmock ]))
|
||||
xvfb-run
|
||||
];
|
||||
|
||||
@ -194,19 +151,21 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "ENABLE_LIBDEVICEINFO" true)
|
||||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
|
||||
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (
|
||||
lib.concatStringsSep ";" [
|
||||
# Exclude tests
|
||||
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
|
||||
"-E"
|
||||
(lib.strings.escapeShellArg "(${
|
||||
lib.concatStringsSep "|" [
|
||||
# Hits OpenGL context issue inside lomiri-ui-toolkit, see derivation of that on details
|
||||
"^testmouse"
|
||||
"^tst_notifications"
|
||||
]})")
|
||||
]))
|
||||
]
|
||||
})")
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
# CMake option had to be excluded from earlier patchset
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (lib.strings.versionOlder python3.pkgs.python-dbusmock.version "0.30.1") "-DMODERN_PYTHON_DBUSMOCK";
|
||||
|
||||
# The linking for this normally ignores missing symbols, which is inconvenient for figuring out why subpages may be
|
||||
# failing to load their library modules. Force it to report them at linktime instead of runtime.
|
||||
env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
|
||||
@ -218,7 +177,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
preCheck = ''
|
||||
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
||||
export QML2_IMPORT_PATH=${lib.makeSearchPathOutput "bin" qtbase.qtQmlPrefix ([ qtdeclarative lomiri-ui-toolkit lomiri-settings-components ] ++ lomiri-ui-toolkit.propagatedBuildInputs)}
|
||||
export QML2_IMPORT_PATH=${
|
||||
lib.makeSearchPathOutput "bin" qtbase.qtQmlPrefix (
|
||||
[
|
||||
qtdeclarative
|
||||
lomiri-ui-toolkit
|
||||
lomiri-settings-components
|
||||
]
|
||||
++ lomiri-ui-toolkit.propagatedBuildInputs
|
||||
)
|
||||
}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
@ -244,8 +212,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mainProgram = "lomiri-system-settings";
|
||||
maintainers = teams.lomiri.members;
|
||||
platforms = platforms.linux;
|
||||
pkgConfigModules = [
|
||||
"LomiriSystemSettings"
|
||||
];
|
||||
pkgConfigModules = [ "LomiriSystemSettings" ];
|
||||
};
|
||||
})
|
||||
|
@ -1,94 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, biometryd
|
||||
, cmake
|
||||
, libqtdbusmock
|
||||
, libqtdbustest
|
||||
, lomiri-system-settings-unwrapped
|
||||
, pkg-config
|
||||
, polkit
|
||||
, python3
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
, trust-store
|
||||
, xvfb-run
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-system-settings-security-privacy";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/lomiri-system-settings-security-privacy";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-d7OgxV362gJ3t5N+DEFgwyK+m6Ij6juRPuxfmbCg68Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# CMake pkg_get_variable cannot replace prefix variable yet
|
||||
for pcvar in plugin_manifest_dir plugin_private_module_dir plugin_qml_dir; do
|
||||
pcvarname=$(echo $pcvar | tr '[:lower:]' '[:upper:]')
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "pkg_get_variable($pcvarname LomiriSystemSettings $pcvar)" "set($pcvarname $(pkg-config LomiriSystemSettings --define-variable=prefix=$out --define-variable=libdir=$out/lib --variable=$pcvar))"
|
||||
done
|
||||
|
||||
# Compatibility with newer libqofono
|
||||
substituteInPlace plugins/security-privacy/{Ofono,PageComponent,SimPin}.qml \
|
||||
--replace-fail 'import MeeGo.QOfono' 'import QOfono'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3
|
||||
qtdeclarative
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
lomiri-system-settings-unwrapped
|
||||
polkit
|
||||
qtbase
|
||||
qtdeclarative
|
||||
trust-store
|
||||
];
|
||||
|
||||
# QML components and schemas the wrapper needs
|
||||
propagatedBuildInputs = [
|
||||
biometryd
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
xvfb-run
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
libqtdbusmock
|
||||
libqtdbustest
|
||||
];
|
||||
|
||||
# Plugin library & modules for LSS
|
||||
dontWrapQtApps = true;
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
preCheck = ''
|
||||
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Security and privacy settings plugin for Lomiri system settings";
|
||||
homepage = "https://gitlab.com/ubports/development/core/lomiri-system-settings-security-privacy";
|
||||
changelog = "https://gitlab.com/ubports/development/core/lomiri-system-settings-security-privacy/-/blob/${finalAttrs.version}/ChangeLog";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = teams.lomiri.members;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
@ -1,13 +1,13 @@
|
||||
{ stdenvNoCC
|
||||
, lib
|
||||
, nixosTests
|
||||
, glib
|
||||
, lndir
|
||||
, lomiri-system-settings-unwrapped
|
||||
, lomiri-system-settings-security-privacy
|
||||
, wrapGAppsHook3
|
||||
, wrapQtAppsHook
|
||||
, plugins ? [ lomiri-system-settings-security-privacy ]
|
||||
{
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
nixosTests,
|
||||
glib,
|
||||
lndir,
|
||||
lomiri-system-settings-unwrapped,
|
||||
wrapGAppsHook3,
|
||||
wrapQtAppsHook,
|
||||
plugins ? [ ],
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
@ -1,90 +1,82 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, fetchpatch2
|
||||
, gitUpdater
|
||||
, linkFarm
|
||||
, nixosTests
|
||||
, ayatana-indicator-datetime
|
||||
, bash
|
||||
, biometryd
|
||||
, boost
|
||||
, cmake
|
||||
, cmake-extras
|
||||
, coreutils
|
||||
, dbus
|
||||
, dbus-test-runner
|
||||
, deviceinfo
|
||||
, geonames
|
||||
, glib
|
||||
, glm
|
||||
, gnome-desktop
|
||||
, gsettings-qt
|
||||
, gtk3
|
||||
, hfd-service
|
||||
, libevdev
|
||||
, libqtdbustest
|
||||
, libqtdbusmock
|
||||
, libusermetrics
|
||||
, libuuid
|
||||
, lightdm_qt
|
||||
, lomiri-api
|
||||
, lomiri-app-launch
|
||||
, lomiri-download-manager
|
||||
, lomiri-indicator-network
|
||||
, lomiri-ui-toolkit
|
||||
, lomiri-settings-components
|
||||
, lomiri-system-settings-unwrapped
|
||||
, lomiri-schemas
|
||||
, lomiri-notifications
|
||||
, lomiri-thumbnailer
|
||||
, maliit-keyboard
|
||||
, mir_2_15
|
||||
, nixos-icons
|
||||
, pam
|
||||
, pkg-config
|
||||
, properties-cpp
|
||||
, protobuf
|
||||
, python3
|
||||
, qmenumodel
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
, qtmir
|
||||
, qtmultimedia
|
||||
, qtsvg
|
||||
, telephony-service
|
||||
, wrapGAppsHook3
|
||||
, wrapQtAppsHook
|
||||
, xwayland
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
fetchpatch2,
|
||||
gitUpdater,
|
||||
linkFarm,
|
||||
nixosTests,
|
||||
ayatana-indicator-datetime,
|
||||
bash,
|
||||
biometryd,
|
||||
boost,
|
||||
cmake,
|
||||
cmake-extras,
|
||||
coreutils,
|
||||
dbus,
|
||||
dbus-test-runner,
|
||||
deviceinfo,
|
||||
geonames,
|
||||
glib,
|
||||
glm,
|
||||
gnome-desktop,
|
||||
gsettings-qt,
|
||||
gtk3,
|
||||
hfd-service,
|
||||
libevdev,
|
||||
libqtdbustest,
|
||||
libqtdbusmock,
|
||||
libusermetrics,
|
||||
libuuid,
|
||||
lightdm_qt,
|
||||
lomiri-api,
|
||||
lomiri-app-launch,
|
||||
lomiri-download-manager,
|
||||
lomiri-indicator-network,
|
||||
lomiri-ui-toolkit,
|
||||
lomiri-settings-components,
|
||||
lomiri-system-settings-unwrapped,
|
||||
lomiri-schemas,
|
||||
lomiri-notifications,
|
||||
lomiri-thumbnailer,
|
||||
maliit-keyboard,
|
||||
mir_2_15,
|
||||
nixos-icons,
|
||||
pam,
|
||||
pkg-config,
|
||||
properties-cpp,
|
||||
protobuf,
|
||||
python3,
|
||||
qmenumodel,
|
||||
qtbase,
|
||||
qtdeclarative,
|
||||
qtmir,
|
||||
qtmultimedia,
|
||||
qtsvg,
|
||||
telephony-service,
|
||||
wrapGAppsHook3,
|
||||
wrapQtAppsHook,
|
||||
xwayland,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri";
|
||||
version = "0.2.1";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/lomiri";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-V5Lt870eHgmJ63OF8bTiNFLAFrxdgNihkd7aodSO3v8=";
|
||||
hash = "sha256-Godl/SQ0+NkI6kwH85SXHPQ5GRlih3xvCyeYxwiqH/s=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Remove when version > 0.2.1
|
||||
# Remove when version > 0.3.0
|
||||
(fetchpatch {
|
||||
name = "0001-lomiri-Fix-overwriting-INCLUDE_DIRECTORIES-variable.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/53190bf2f03c8a35491efb26222b8d67ff6caa34.patch";
|
||||
hash = "sha256-sbwqOqpTf5OlEB4NZZZTFNXyKq4rTQAxJ6U8YP/DT5s=";
|
||||
})
|
||||
|
||||
# fetchpatch2 for renames
|
||||
# Use GNUInstallDirs variables better, replace more /usr references
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri/-/merge_requests/137 merged & in release
|
||||
(fetchpatch2 {
|
||||
name = "0002-lomiri-Make-less-FHS-assumptions.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/817ae1d8ed927e661fbc006851163ba99c46ae13.patch";
|
||||
hash = "sha256-NLvpzI2MtjKcGrgTn6PbLXSy3/Jg8KxdSvVYO9KYu9g=";
|
||||
name = "0001-lomiri-Fix-accountsservice-test.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/353153c4ebc40ffcc7702af42205d2075fc81503.patch";
|
||||
hash = "sha256-J9ySZgWd7KR7aU1cCRu5iirq7bi3NdLR9SZs9Pd1I8w=";
|
||||
})
|
||||
|
||||
# Fix greeter & related settings
|
||||
@ -116,34 +108,24 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-guq/Ykcq4WcuXxNKO1eA4sJFyGSpZo0gtyFTdeK/GeE=";
|
||||
})
|
||||
|
||||
# fetchpatch2 for renames
|
||||
# Remove when version > 0.2.1
|
||||
(fetchpatch2 {
|
||||
name = "1010-lomiri-QOfono-namespace.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/d0397dadb5f05097f916c5b39e6d9b95d4ab9e4d.patch";
|
||||
hash = "sha256-wIkHlz2vYxF9eeH/sYYEdD9f8m4ylHEXXnX/DFG3HXg=";
|
||||
})
|
||||
|
||||
./9901-lomiri-Disable-Wizard.patch
|
||||
./9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
postPatch =
|
||||
''
|
||||
# Part of greeter fix, applies separately due to merge conflicts
|
||||
substituteInPlace data/lomiri-greeter.desktop.in.in \
|
||||
--replace-fail '@CMAKE_INSTALL_FULL_BINDIR@/lomiri-greeter-wrapper @CMAKE_INSTALL_FULL_BINDIR@/lomiri --mode=greeter' '@CMAKE_INSTALL_FULL_BINDIR@/lomiri --mode=greeter' \
|
||||
--replace-fail 'X-LightDM-Session-Type=mir' 'X-LightDM-Session-Type=wayland'
|
||||
|
||||
# Part of QOfono namespace patch, fetchpatch2 cannot handle rename-only changes
|
||||
for unmovedThing in tests/mocks/MeeGo/QOfono/*; do
|
||||
mv "$unmovedThing" "tests/mocks/QOfono/$(basename "$unmovedThing")"
|
||||
done
|
||||
rmdir tests/mocks/MeeGo/QOfono
|
||||
rmdir tests/mocks/MeeGo
|
||||
# Written with a different qtmir branch in mind, but different branch breaks compat with some patches
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'qt5mir2server' 'qtmirserver'
|
||||
|
||||
# Need to replace prefix
|
||||
substituteInPlace data/systemd-user/CMakeLists.txt \
|
||||
--replace-fail 'pkg_get_variable(SYSTEMD_USERUNITDIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USERUNITDIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'
|
||||
--replace-fail 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir)' 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'
|
||||
|
||||
# Don't embed full paths into regular desktop files (but do embed them into lightdm greeter one)
|
||||
substituteInPlace data/{indicators-client,lomiri}.desktop.in.in \
|
||||
@ -154,9 +136,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace tests/mocks/CMakeLists.txt \
|
||||
--replace-fail 'add_subdirectory(QtMir/Application)' ""
|
||||
|
||||
#substituteInPlace plugins/AccountsService/CMakeLists.txt \
|
||||
# --replace-fail 'CMAKE_INSTALL_DATADIR' 'CMAKE_INSTALL_FULL_DATADIR'
|
||||
|
||||
# NixOS-ify
|
||||
|
||||
# Use Nix flake instead of Canonical's Ubuntu logo
|
||||
@ -166,12 +145,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Look up default wallpaper in current system
|
||||
substituteInPlace plugins/Utils/constants.cpp \
|
||||
--replace-fail '/usr/share/backgrounds' '/run/current-system/sw/share/wallpapers'
|
||||
'' + lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
''
|
||||
+ lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
patchShebangs tests/whitespace/check_whitespace.py
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
dbus-test-runner
|
||||
glib # populates GSETTINGS_SCHEMAS_PATH
|
||||
pkg-config
|
||||
wrapGAppsHook3 # XDG_DATA_DIRS wrapper flags for schemas
|
||||
@ -224,11 +205,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
telephony-service
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
(python3.withPackages (ps: with ps; [
|
||||
python-dbusmock
|
||||
]))
|
||||
];
|
||||
nativeCheckInputs = [ (python3.withPackages (ps: with ps; [ python-dbusmock ])) ];
|
||||
|
||||
checkInputs = [
|
||||
libqtdbustest
|
||||
@ -243,6 +220,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "NO_TESTS" (!finalAttrs.finalPackage.doCheck))
|
||||
(lib.cmakeBool "WITH_MIR2" true)
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
@ -266,7 +244,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
wrapQtApp $out/bin/lomiri-mock-indicator-service
|
||||
|
||||
wrapProgram $out/bin/lomiri-greeter-wrapper \
|
||||
--prefix PATH : ${lib.makeBinPath [ coreutils dbus deviceinfo glib ]} \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
dbus
|
||||
deviceinfo
|
||||
glib
|
||||
]
|
||||
} \
|
||||
--set LOMIRI_BINARY "$out/bin/lomiri"
|
||||
|
||||
wrapProgram $out/libexec/Xwayland.lomiri \
|
||||
@ -277,12 +262,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.lomiri = nixosTests.lomiri;
|
||||
tests = {
|
||||
inherit (nixosTests.lomiri) greeter desktop desktop-ayatana-indicators;
|
||||
};
|
||||
updateScript = gitUpdater { };
|
||||
greeter = linkFarm "lomiri-greeter" [{
|
||||
greeter = linkFarm "lomiri-greeter" [
|
||||
{
|
||||
path = "${finalAttrs.finalPackage}/share/lightdm/greeters/lomiri-greeter.desktop";
|
||||
name = "lomiri-greeter.desktop";
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,26 +1,18 @@
|
||||
From 30b5391c3f20180fe7427fe179ba26f846200d96 Mon Sep 17 00:00:00 2001
|
||||
From fa705235cafbeb4a016bdcb0067218b29506eb84 Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Mon, 3 Jun 2024 20:50:03 +0200
|
||||
Date: Fri, 19 Jul 2024 16:22:07 +0200
|
||||
Subject: [PATCH] Unset QT_QPA_PLATFORMTHEME
|
||||
|
||||
gtk3 value breaks Lomiri startup
|
||||
---
|
||||
lomiri-session | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
lomiri-session.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lomiri-session b/lomiri-session
|
||||
index 9d68249..b103840 100755
|
||||
--- a/lomiri-session
|
||||
+++ b/lomiri-session
|
||||
@@ -47,6 +47,7 @@ fi
|
||||
|
||||
# Set some envs
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
+export QT_QPA_PLATFORMTHEME=
|
||||
export QT_IM_MODULE=maliit
|
||||
export MALIIT_FORCE_DBUS_CONNECTION=1
|
||||
export UITK_ICON_THEME=suru
|
||||
@@ -55,6 +56,7 @@ dbus-update-activation-environment --systemd MALIIT_FORCE_DBUS_CONNECTION=1
|
||||
diff --git a/lomiri-session.in b/lomiri-session.in
|
||||
index 50dd4cb..ffc20c4 100755
|
||||
--- a/lomiri-session.in
|
||||
+++ b/lomiri-session.in
|
||||
@@ -55,6 +55,7 @@ dbus-update-activation-environment --systemd MALIIT_FORCE_DBUS_CONNECTION=1
|
||||
dbus-update-activation-environment --systemd QT_IM_MODULE=maliit
|
||||
dbus-update-activation-environment --systemd GTK_IM_MODULE=maliit
|
||||
dbus-update-activation-environment --systemd QT_QPA_PLATFORM=wayland
|
||||
|
@ -1,153 +1,40 @@
|
||||
{ stdenvNoCC
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, fetchpatch2
|
||||
, gitUpdater
|
||||
, nixosTests
|
||||
, bash
|
||||
, cmake
|
||||
, dbus
|
||||
, deviceinfo
|
||||
, inotify-tools
|
||||
, lomiri
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, runtimeShell
|
||||
, systemd
|
||||
{
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
gitUpdater,
|
||||
nixosTests,
|
||||
bash,
|
||||
cmake,
|
||||
dbus,
|
||||
deviceinfo,
|
||||
inotify-tools,
|
||||
lomiri,
|
||||
makeWrapper,
|
||||
pkg-config,
|
||||
runtimeShell,
|
||||
systemd,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-session";
|
||||
version = "0.2";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/lomiri-session";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-1ZpAn1tFtlXIfeejG0TnrJBRjf3tyz7CD+riWo+sd0s=";
|
||||
hash = "sha256-XduE3tPUjw/wIjFCACasxtN33KO4bDLWrpl7pZcYaAA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Properly gate of UBtouch-specific code
|
||||
# Otherwise session won't launch, errors out on a removed Mir setting
|
||||
# Remove when version > 0.2
|
||||
(fetchpatch {
|
||||
name = "0001-lomiri-session-Properly-differentiate-between-Ubuntu-Touch-and-Lomiri-Desktop-session.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/780c19d8b4f18ce24ceb64b8abfae70018579dce.patch";
|
||||
hash = "sha256-eFiagFEpH43WpVGA6xkI1IiQ99HHizonhXYg1wYAhwU=";
|
||||
})
|
||||
|
||||
# Export Lomiri-prefixed stop envvar
|
||||
# Remove when version > 0.2
|
||||
(fetchpatch {
|
||||
name = "0002-lomiri-session-Use-LOMIRI_MIR_EMITS_SIGSTOP.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/452e38b489b5893aac3481410d708f4397b1fa1c.patch";
|
||||
hash = "sha256-w/kifBLfDm8+CBliVjm4o8JtjaOByHf97XyPhVk6Gho=";
|
||||
})
|
||||
|
||||
# Removes broken first-time wizard check
|
||||
# Remove when version > 0.2
|
||||
(fetchpatch {
|
||||
name = "0003-lomiri-session-Drop-old-wizard-has-run-check.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/c16ae87d8848f9909850072f7728c03c894b1a47.patch";
|
||||
hash = "sha256-AIwgztFOGwG2zUsaUen/Z3Mes9m7VgbvNKWp/qYp4g4=";
|
||||
})
|
||||
|
||||
# Fix quoting on ps check
|
||||
# Remove when version > 0.2
|
||||
(fetchpatch {
|
||||
name = "0004-lomiri-session-Put-evaluation-of-ps-call-in-quotes.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/2d7368eae99f07200c814c840636206b9eaa485d.patch";
|
||||
hash = "sha256-6LqurJqi/I+Qw64hWTrvA8uA/EIRZbcS6TRRXK+9s1s=";
|
||||
})
|
||||
|
||||
# Check for Xwayland presense to determine X11 support
|
||||
# Remove when version > 0.2
|
||||
(fetchpatch {
|
||||
name = "0005-lomiri-session-Check-for-Xwayland-presence.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/707e43d3b1a6200535b7682e63817265a8e4ee7e.patch";
|
||||
hash = "sha256-sI00P31QVF7ZKdwNep2r+0MetNGg/bbrd2YfEzZPLFI=";
|
||||
})
|
||||
|
||||
# Fix systemd service startup things, drop upstart hacks
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-session/-/merge_requests/13 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0100-lomiri-session-Drop-Before-Wants-for-App-Indicator-targets.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/ccebdc1c47d7411a9cf4ad2e529471fb0403433a.patch";
|
||||
hash = "sha256-vGFvcCjbwcuLrAUIsL5y/QmoOR5i0560LNv01ZT9OOg=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0101-lomiri-session-Start-lal-application-end.target-on-stop-restart.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/9a945b09feff0c1d2b3203caaf3cec5230481e80.patch";
|
||||
hash = "sha256-1vD+I5YDEh2wF7UDn6ZxPTBRrdUvwWVXt5x5QdkIAkY=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0102-lomiri-session-Drop-manual-Xwayland-start-logic.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/6aee0d6cfd76ab1904876f4166621f9f6d833056.patch";
|
||||
hash = "sha256-iW/Ko+Xm2ZuJuNE7ATeuMTSHby0fXD+D5nWjX6LLLwU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0103-lomiri-session-Set-SyslogIdentifier.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/09d378728685411a04333040279cdaef487dedc8.patch";
|
||||
hash = "sha256-minJSxrn2d0+FBlf7bdN3ddSvsn6YWdeH6ZuCW7qbII=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0104-lomiri-session-Use-LOMIRI_AS_SYSTEMD_UNIT-to-launch-session.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/9bd2552c2638c139a0abff527fda99f2ef94cc42.patch";
|
||||
hash = "sha256-7ipsGrQRJ98uVSRp2e0U4q3iTuyeUalqZIohbxXpT9k=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0105-lomiri-session-Allow-sd_notify-calls-for-NOTIFY_SOCKET.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/2157bfc472f2d35e7c81002a924a1f6aa85f7395.patch";
|
||||
hash = "sha256-qtArOG4gysFWGnXbz3KpXEppaZ1PGDQKEGqnJvU6/RE=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0106-lomiri-session-Change-envvar-for-1-time-binary.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/0cd1dbd30f3d5c6e50bce79146e8511e0ee56153.patch";
|
||||
hash = "sha256-b8/Mrs36JPJE6l6/Dc/PN+zNV8Oq37HOFx+zMQvWPBY=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0107-lomiri-session-Drag-lomiri-process-under-umbrella-of-wrapper-script.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/d8212b1862924eb283fd1ee7ea390a144d5ee97e.patch";
|
||||
hash = "sha256-UJzV0pYEBBrXSpYxdFoBoMRzPeIQtvtPzDW2/Ljz+uI=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "0108-lomiri-session-Dont-hide-exit-code-from-systemd.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/9ac78d736caa891a4923be8d040fe8224e335215.patch";
|
||||
hash = "sha256-yPg1K0IfaGYKqg9536i9AFCLTcAENlsJNdHjrElSeZ4=";
|
||||
})
|
||||
|
||||
# Don't require a C & C++ compiler, nothing to compile
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-session/-/merge_requests/14 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0200-lomiri-session-Dont-require-a-compiler.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/6915a5678e09e5dbcb26d29a8e5585d032a19186.patch";
|
||||
hash = "sha256-2SWiOLDLsdTjRHaJcnZe/WKcFMFmHtpZsuj7bQCtB4A=";
|
||||
})
|
||||
|
||||
# Use GNUInstallDirs for install locations, find_program() for locations of used binaries
|
||||
# fetchpatch2 due to renames, need to resolve merge conflict manually in postPatch
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-session/-/merge_requests/15 merged & in release
|
||||
(fetchpatch2 {
|
||||
name = "0201-lomiri-session-Hardcode-less-locations.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/lomiri-session/-/commit/d5b93ecaf08ba776a79c69e8a9dd05d0b6181947.patch";
|
||||
excludes = [ "systemd/lomiri.service" ];
|
||||
hash = "sha256-BICb6ZwU/sUBzmM4udsOndIgw1A03I/UEG000YvMZ9Y=";
|
||||
})
|
||||
|
||||
./1001-Unset-QT_QPA_PLATFORMTHEME.patch
|
||||
];
|
||||
patches = [ ./1001-Unset-QT_QPA_PLATFORMTHEME.patch ];
|
||||
|
||||
postPatch = ''
|
||||
# Resolving merge conflict
|
||||
mv systemd/lomiri.service{,.in}
|
||||
substituteInPlace systemd/lomiri.service.in \
|
||||
--replace-fail '/usr/bin/lomiri-session' '@CMAKE_INSTALL_FULL_BINDIR@/lomiri-session' \
|
||||
--replace-fail '/usr/bin/dbus-update-activation-environment' '@DUAE_BIN@'
|
||||
|
||||
substituteInPlace lomiri-session \
|
||||
substituteInPlace lomiri-session.in \
|
||||
--replace-fail '/usr/libexec/Xwayland.lomiri' '${lib.getBin lomiri}/libexec/Xwayland.lomiri'
|
||||
|
||||
substituteInPlace systemd/CMakeLists.txt \
|
||||
--replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -173,7 +60,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
postInstall = ''
|
||||
patchShebangs $out/bin/lomiri-session
|
||||
wrapProgram $out/bin/lomiri-session \
|
||||
--prefix PATH : ${lib.makeBinPath [ deviceinfo inotify-tools lomiri ]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
deviceinfo
|
||||
inotify-tools
|
||||
lomiri
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
@ -1,12 +1,17 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, libsForQt5
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
libsForQt5,
|
||||
}:
|
||||
|
||||
let
|
||||
packages = self: let
|
||||
packages =
|
||||
self:
|
||||
let
|
||||
inherit (self) callPackage;
|
||||
in {
|
||||
in
|
||||
{
|
||||
#### Core Apps
|
||||
lomiri = callPackage ./applications/lomiri { };
|
||||
lomiri-calculator-app = callPackage ./applications/lomiri-calculator-app { };
|
||||
@ -14,7 +19,6 @@ let
|
||||
lomiri-clock-app = callPackage ./applications/lomiri-clock-app { };
|
||||
lomiri-filemanager-app = callPackage ./applications/lomiri-filemanager-app { };
|
||||
lomiri-system-settings-unwrapped = callPackage ./applications/lomiri-system-settings { };
|
||||
lomiri-system-settings-security-privacy = callPackage ./applications/lomiri-system-settings/plugins/lomiri-system-settings-security-privacy.nix { };
|
||||
lomiri-system-settings = callPackage ./applications/lomiri-system-settings/wrapper.nix { };
|
||||
lomiri-terminal-app = callPackage ./applications/lomiri-terminal-app { };
|
||||
morph-browser = callPackage ./applications/morph-browser { };
|
||||
@ -63,3 +67,6 @@ let
|
||||
};
|
||||
in
|
||||
lib.makeScope libsForQt5.newScope packages
|
||||
// lib.optionalAttrs config.allowAliases {
|
||||
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
|
||||
}
|
||||
|
@ -136,11 +136,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Exclude tests
|
||||
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
|
||||
# Flaky, randomly failing to launch properly & stuck until test timeout
|
||||
# https://gitlab.com/ubports/development/core/lomiri-telephony-service/-/issues/70
|
||||
"^HandlerTest"
|
||||
"^OfonoAccountEntryTest"
|
||||
"^TelepathyHelperSetupTest"
|
||||
"^AuthHandlerTest"
|
||||
"^ChatManagerTest"
|
||||
"^AccountEntryTest"
|
||||
"^AccountEntryFactoryTest"
|
||||
"^PresenceRequestTest"
|
||||
"^CallEntryTest"
|
||||
]})")
|
||||
]))
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user