Merge pull request #332220 from OPNA2608/update/lomiri/OTA-5

lomiri.*: OTA-5
This commit is contained in:
Cosima Neidahl
2024-08-09 17:37:39 +02:00
committed by GitHub
12 changed files with 796 additions and 915 deletions

View File

@@ -1,7 +1,8 @@
{ config {
, pkgs config,
, lib pkgs,
, ... lib,
...
}: }:
let let
@@ -32,26 +33,27 @@ in
environment = { environment = {
systemPackages = cfg.packages; systemPackages = cfg.packages;
pathsToLink = [ pathsToLink = [ "/share/ayatana" ];
"/share/ayatana"
];
}; };
# libayatana-common's ayatana-indicators.target with explicit Wants & Before to bring up requested indicator services # 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 let
indicatorServices = lib.lists.flatten indicatorServices = lib.lists.flatten (
(map map (pkg: (map (ind: "${ind}.service") pkg.passthru.ayatana-indicators)) cfg.packages
(pkg: );
(map (ind: "${ind}.service") pkg.passthru.ayatana-indicators))
cfg.packages);
in in
{ lib.attrsets.mapAttrs
description = "Target representing the lifecycle of the Ayatana Indicators. Each indicator should be bound to it in its individual service file"; (_: desc: {
partOf = [ "graphical-session.target" ]; description = "Target representing the lifecycle of the ${desc}. Each indicator should be bound to it in its individual service file";
wants = indicatorServices; partOf = [ "graphical-session.target" ];
before = indicatorServices; wants = indicatorServices;
}; before = indicatorServices;
})
{
ayatana-indicators = "Ayatana Indicators";
lomiri-indicators = "Ayatana/Lomiri Indicators that shall be run in Lomiri";
};
}; };
meta.maintainers = with lib.maintainers; [ OPNA2608 ]; meta.maintainers = with lib.maintainers; [ OPNA2608 ];

View File

@@ -537,7 +537,7 @@ in {
lxd = pkgs.recurseIntoAttrs (handleTest ./lxd { inherit handleTestOn; }); lxd = pkgs.recurseIntoAttrs (handleTest ./lxd { inherit handleTestOn; });
lxd-image-server = handleTest ./lxd-image-server.nix {}; lxd-image-server = handleTest ./lxd-image-server.nix {};
#logstash = handleTest ./logstash.nix {}; #logstash = handleTest ./logstash.nix {};
lomiri = handleTest ./lomiri.nix {}; lomiri = discoverTests (import ./lomiri.nix);
lomiri-calculator-app = runTest ./lomiri-calculator-app.nix; lomiri-calculator-app = runTest ./lomiri-calculator-app.nix;
lomiri-camera-app = runTest ./lomiri-camera-app.nix; lomiri-camera-app = runTest ./lomiri-camera-app.nix;
lomiri-clock-app = runTest ./lomiri-clock-app.nix; lomiri-clock-app = runTest ./lomiri-clock-app.nix;

View File

@@ -1,363 +1,496 @@
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 # Just to make sure everything is the same, need it for OCR & navigating greeter
user = "alice"; user = "alice";
description = "Alice Foobar"; description = "Alice Foobar";
password = "foobar"; password = "foobar";
in { in
name = "lomiri"; {
greeter = makeTest (
{ pkgs, lib, ... }:
{
name = "lomiri-greeter";
meta = { meta = {
maintainers = lib.teams.lomiri.members; maintainers = lib.teams.lomiri.members;
}; };
nodes.machine = { config, ... }: { nodes.machine =
imports = [ { config, ... }:
./common/user-account.nix {
]; imports = [ ./common/user-account.nix ];
users.users.${user} = { virtualisation.memorySize = 2047;
inherit description password;
};
# To control mouse via scripting users.users.${user} = {
programs.ydotool.enable = true; inherit description password;
services.desktopManager.lomiri.enable = lib.mkForce true;
services.displayManager.defaultSession = lib.mkForce "lomiri";
# Help with OCR
fonts.packages = [ pkgs.inconsolata ];
environment = {
# Help with OCR
etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
font = rec {
normal.family = "Inconsolata";
bold.family = normal.family;
italic.family = normal.family;
bold_italic.family = normal.family;
size = 16;
};
colors = rec {
primary = {
foreground = "0x000000";
background = "0xffffff";
}; };
normal = {
green = primary.foreground; 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;
services.desktopManager.lomiri.enable = lib.mkForce true;
services.displayManager.defaultSession = lib.mkForce "lomiri";
# Help with OCR
fonts.packages = [ pkgs.inconsolata ];
environment = {
# Help with OCR
etc."xdg/alacritty/alacritty.yml".text = lib.generators.toYAML { } {
font = rec {
normal.family = "Inconsolata";
bold.family = normal.family;
italic.family = normal.family;
bold_italic.family = normal.family;
size = 16;
};
colors = rec {
primary = {
foreground = "0x000000";
background = "0xffffff";
};
normal = {
green = primary.foreground;
};
};
};
variables = {
# So we can test what content-hub is working behind the scenes
CONTENT_HUB_LOGGING_LEVEL = "2";
};
systemPackages = with pkgs; [
# For a convenient way of kicking off content-hub peer collection
lomiri.content-hub.examples
# Forcing alacritty to run as an X11 app when opened from the starter menu
(symlinkJoin {
name = "x11-${alacritty.name}";
paths = [ alacritty ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/alacritty \
--set WINIT_UNIX_BACKEND x11 \
--set WAYLAND_DISPLAY ""
'';
inherit (alacritty) meta;
})
];
};
# Help with OCR
systemd.tmpfiles.settings =
let
white = "255, 255, 255";
black = "0, 0, 0";
colorSection = color: {
Color = color;
Bold = true;
Transparency = false;
};
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 { } {
General = {
colorScheme = "customized";
fontSize = "16";
fontStyle = "Inconsolata";
};
}
);
confBase = "${config.users.users.${user}.home}/.config";
userDirArgs = {
mode = "0700";
user = user;
group = "users";
};
in
{
"10-lomiri-test-setup" = {
"${confBase}".d = userDirArgs;
"${confBase}/terminal.ubports".d = userDirArgs;
"${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}";
"${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}";
};
};
}; };
enableOCR = true;
testScript =
{ nodes, ... }:
''
def toggle_maximise():
"""
Maximise the current window.
"""
machine.send_key("ctrl-meta_l-up")
# For some reason, Lomiri in these VM tests very frequently opens the starter menu a few seconds after sending the above.
# Because this isn't 100% reproducible all the time, and there is no command to await when OCR doesn't pick up some text,
# the best we can do is send some Escape input after waiting some arbitrary time and hope that it works out fine.
machine.sleep(5)
machine.send_key("esc")
machine.sleep(5)
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)
def open_starter():
"""
Open the starter, and ensure it's opened.
"""
# Using the keybind has a chance of instantly closing the menu again? Just click the button
mouse_click(20, 30)
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")
# Working terminal keybind is good
with subtest("terminal keybind works"):
machine.send_key("ctrl-alt-t")
machine.wait_for_text(r"(${user}|machine)")
machine.screenshot("terminal_opens")
# 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")
machine.wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub
machine.send_key("ctrl-c")
# 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("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.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)
machine.send_key("alt-f4")
# We want the ability to launch applications
with subtest("starter menu works"):
open_starter()
machine.screenshot("starter_opens")
# Just try the terminal again, we know that it should work
machine.send_chars("Terminal\n")
machine.wait_for_text(r"(${user}|machine)")
machine.send_key("alt-f4")
# We want support for X11 apps
with subtest("xwayland support works"):
open_starter()
machine.send_chars("Alacritty\n")
machine.wait_for_text(r"(${user}|machine)")
machine.screenshot("alacritty_opens")
machine.send_key("alt-f4")
# Morph is how we go online
with subtest("morph browser works"):
open_starter()
machine.send_chars("Morph\n")
machine.wait_for_text(r"(Bookmarks|address|site|visited any)")
machine.screenshot("morph_open")
# morph-browser has a separate VM test, there isn't anything new we could test here
machine.send_key("alt-f4")
# LSS provides DE settings
with subtest("system settings open"):
open_starter()
machine.send_chars("System Settings\n")
machine.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
# Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio
toggle_maximise()
# Load Background plugin
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("ret")
machine.wait_for_text("Background image")
# Try to load custom background
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("ret")
# Peers should be loaded
machine.wait_for_text("Morph") # or Gallery, but Morph is already packaged
machine.screenshot("settings_content-hub_peers")
# Select Morph as content source
mouse_click(370, 100)
# Expect Morph to be brought into the foreground, with its Downloads page open
machine.wait_for_text("No downloads")
# If 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")
# Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign
machine.send_key("esc")
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;
}; };
variables = { nodes.machine =
# So we can test what content-hub is working behind the scenes { config, ... }:
CONTENT_HUB_LOGGING_LEVEL = "2"; {
}; imports = [
./common/auto.nix
./common/user-account.nix
];
systemPackages = with pkgs; [ virtualisation.memorySize = 2047;
# For a convenient way of kicking off content-hub peer collection
lomiri.content-hub.examples
# Forcing alacritty to run as an X11 app when opened from the starter menu users.users.${user} = {
(symlinkJoin { inherit description password;
name = "x11-${alacritty.name}"; };
paths = [ alacritty ]; test-support.displayManager.auto = {
enable = true;
inherit user;
};
nativeBuildInputs = [ makeWrapper ]; # To control mouse via scripting
programs.ydotool.enable = true;
postBuild = '' services.desktopManager.lomiri.enable = lib.mkForce true;
wrapProgram $out/bin/alacritty \ services.displayManager.defaultSession = lib.mkForce "lomiri";
--set WINIT_UNIX_BACKEND x11 \
--set WAYLAND_DISPLAY ""
'';
inherit (alacritty) meta; # Help with OCR
}) fonts.packages = [ pkgs.inconsolata ];
# 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
white = "255, 255, 255";
black = "0, 0, 0";
colorSection = color: {
Color = color;
Bold = true;
Transparency = false;
};
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 {} {
General = {
colorScheme = "customized";
fontSize = "16";
fontStyle = "Inconsolata";
}; };
});
confBase = "${config.users.users.${user}.home}/.config";
userDirArgs = {
mode = "0700";
user = user;
group = "users";
};
in {
"10-lomiri-test-setup" = {
"${confBase}".d = userDirArgs;
"${confBase}/terminal.ubports".d = userDirArgs;
"${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}";
"${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}";
};
};
};
enableOCR = true; enableOCR = true;
testScript = { nodes, ... }: '' testScript =
def toggle_maximise(): { nodes, ... }:
""" ''
Maximise the current window. def mouse_click(xpos, ypos):
""" """
machine.send_key("ctrl-meta_l-up") Move the mouse to a screen location and hit left-click.
"""
# For some reason, Lomiri in these VM tests very frequently opens the starter menu a few seconds after sending the above. # Need to reset to top-left, --absolute doesn't work?
# Because this isn't 100% reproducible all the time, and there is no command to await when OCR doesn't pick up some text, machine.execute("ydotool mousemove -- -10000 -10000")
# the best we can do is send some Escape input after waiting some arbitrary time and hope that it works out fine. machine.sleep(2)
machine.sleep(5)
machine.send_key("esc")
machine.sleep(5)
def mouse_click(xpos, ypos): # Move
""" machine.execute(f"ydotool mousemove -- {xpos} {ypos}")
Move the mouse to a screen location and hit left-click. machine.sleep(2)
"""
# Need to reset to top-left, --absolute doesn't work? # Click (C0 - left button: down & up)
machine.execute("ydotool mousemove -- -10000 -10000") machine.execute("ydotool click 0xC0")
machine.sleep(2) machine.sleep(2)
# Move start_all()
machine.execute(f"ydotool mousemove -- {xpos} {ypos}") machine.wait_for_unit("multi-user.target")
machine.sleep(2)
# Click (C0 - left button: down & up) # The session should start, and not be stuck in i.e. a crash loop
machine.execute("ydotool click 0xC0") with subtest("lomiri starts"):
machine.sleep(2) 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")
def open_starter(): # 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.
Open the starter, and ensure it's opened. with subtest("ayatana indicators work"):
""" mouse_click(735, 0) # the cog in the top-right, for the session indicator
machine.wait_for_text(r"(Notifications|Rotation|Battery|Sound|Time|Date|System)")
machine.screenshot("indicators_open")
# Using the keybind has a chance of instantly closing the menu again? Just click the button # Indicator order within the menus *should* be fixed based on per-indicator order setting
mouse_click(20, 30) # Session is the one we clicked, but the last we should test (logout). Go as far left as we can test.
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
# Notifications are usually empty, nothing to check there
start_all() with subtest("ayatana indicator display works"):
machine.wait_for_unit("multi-user.target") # We start on this, don't go right
machine.wait_for_text("Lock")
machine.screenshot("indicators_display")
# Lomiri in greeter mode should work & be able to start a session with subtest("lomiri indicator network works"):
with subtest("lomiri greeter works"): machine.send_key("right")
machine.wait_for_unit("display-manager.service") machine.wait_for_text(r"(Flight|Wi-Fi)")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'") machine.screenshot("indicators_network")
# Start page shows current time with subtest("ayatana indicator sound works"):
machine.wait_for_text(r"(AM|PM)") machine.send_key("right")
machine.screenshot("lomiri_greeter_launched") machine.wait_for_text(r"(Silent|Volume)")
machine.screenshot("indicators_sound")
# Advance to login part with subtest("ayatana indicator power works"):
machine.send_key("ret") machine.send_key("right")
machine.wait_for_text("${description}") machine.wait_for_text(r"(Charge|Battery settings)")
machine.screenshot("lomiri_greeter_login") machine.screenshot("indicators_power")
# Login with subtest("ayatana indicator datetime works"):
machine.send_chars("${password}\n") machine.send_key("right")
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'") machine.wait_for_text("Time and Date Settings")
machine.screenshot("indicators_timedate")
# The session should start, and not be stuck in i.e. a crash loop with subtest("ayatana indicator session works"):
with subtest("lomiri starts"): machine.send_key("right")
# Output rendering from Lomiri has started when it starts printing performance diagnostics machine.wait_for_text("Log Out")
machine.wait_for_console_text("Last frame took") machine.screenshot("indicators_session")
# Look for datetime's clock, one of the last elements to load
machine.wait_for_text(r"(AM|PM)")
machine.screenshot("lomiri_launched")
# Working terminal keybind is good # We should be able to log out and return to the greeter
with subtest("terminal keybind works"): mouse_click(720, 280) # "Log Out"
machine.send_key("ctrl-alt-t") mouse_click(400, 240) # confirm logout
machine.wait_for_text(r"(${user}|machine)") machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
machine.screenshot("terminal_opens") '';
}
);
# 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")
machine.wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub
machine.send_key("ctrl-c")
# 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.screenshot("polkit_agent")
machine.execute("lpa-signal")
# polkit test will quit terminal when agent request times out after OCR success
machine.wait_until_fails("pgrep -u ${user} -f lomiri-terminal-app")
# We want the ability to launch applications
with subtest("starter menu works"):
open_starter()
machine.screenshot("starter_opens")
# Just try the terminal again, we know that it should work
machine.send_chars("Terminal\n")
machine.wait_for_text(r"(${user}|machine)")
machine.send_key("alt-f4")
# We want support for X11 apps
with subtest("xwayland support works"):
open_starter()
machine.send_chars("Alacritty\n")
machine.wait_for_text(r"(${user}|machine)")
machine.screenshot("alacritty_opens")
machine.send_key("alt-f4")
# Morph is how we go online
with subtest("morph browser works"):
open_starter()
machine.send_chars("Morph\n")
machine.wait_for_text(r"(Bookmarks|address|site|visited any)")
machine.screenshot("morph_open")
# morph-browser has a separate VM test, there isn't anything new we could test here
machine.send_key("alt-f4")
# LSS provides DE settings
with subtest("system settings open"):
open_starter()
machine.send_chars("System Settings\n")
machine.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
# Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio
toggle_maximise()
# Load Background plugin
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("tab")
machine.send_key("ret")
machine.wait_for_text("Background image")
# Try to load custom background
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("shift-tab")
machine.send_key("ret")
# Peers should be loaded
machine.wait_for_text("Morph") # or Gallery, but Morph is already packaged
machine.screenshot("settings_content-hub_peers")
# Select Morph as content source
mouse_click(370, 100)
# Expect Morph to be brought into the foreground, with its Downloads page open
machine.wait_for_text("No downloads")
# If 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")
# Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign
machine.send_key("esc")
machine.sleep(2) # sleep a tiny bit so morph can close & the focus can return to LSS
machine.send_key("alt-f4")
# 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.
with subtest("ayatana indicators work"):
mouse_click(735, 0) # the cog in the top-right, for the session indicator
machine.wait_for_text(r"(Notifications|Rotation|Battery|Sound|Time|Date|System)")
machine.screenshot("indicators_open")
# Indicator order within the menus *should* be fixed based on per-indicator order setting
# Session is the one we clicked, but the last we should test (logout). Go as far left as we can test.
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
machine.send_key("left")
# Notifications are usually empty, nothing to check there
with subtest("ayatana indicator display works"):
# We start on this, don't go right
machine.wait_for_text("Lock")
machine.screenshot("indicators_display")
with subtest("lomiri indicator network works"):
machine.send_key("right")
machine.wait_for_text(r"(Flight|Wi-Fi)")
machine.screenshot("indicators_network")
with subtest("ayatana indicator sound works"):
machine.send_key("right")
machine.wait_for_text(r"(Silent|Volume)")
machine.screenshot("indicators_sound")
with subtest("ayatana indicator power works"):
machine.send_key("right")
machine.wait_for_text(r"(Charge|Battery settings)")
machine.screenshot("indicators_power")
with subtest("ayatana indicator datetime works"):
machine.send_key("right")
machine.wait_for_text("Time and Date Settings")
machine.screenshot("indicators_timedate")
with subtest("ayatana indicator session works"):
machine.send_key("right")
machine.wait_for_text("Log Out")
machine.screenshot("indicators_session")
# We should be able to log out and return to the greeter
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'")
'';
})

View File

@@ -27,26 +27,18 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-clock-app"; pname = "lomiri-clock-app";
version = "4.0.3"; version = "4.0.4";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "ubports"; owner = "ubports";
repo = "development/apps/lomiri-clock-app"; repo = "development/apps/lomiri-clock-app";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-q/hdnwHO97bhL0W3VsdHwjPvGs6GhWbDiVLCx4NiR50="; hash = "sha256-IWNLMYrebYQe5otNwZtRUs4YGPo/5OFic3Nh2pWxROs=";
}; };
patches = [ 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 # 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 { (fetchpatch {
name = "0002-lomiri-clock-app-Fix-GNUInstallDirs-variable-concatenations-in-CMake.patch"; 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"; 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 # 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 { (fetchpatch {
name = "0003-lomiri-clock-app-Fix-splash-file-installation-in-non-clock-mode.patch"; 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"; 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 # 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 { (fetchpatch {
name = "0008-lomiri-clock-app-tests-Drop-NO_DEFAULT_PATH.patch"; name = "0008-lomiri-clock-app-tests-Drop-NO_DEFAULT_PATH.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/190ef47e2efaaf139920d0556e0522f95479ea95.patch"; url = "https://gitlab.com/ubports/development/apps/lomiri-clock-app/-/commit/190ef47e2efaaf139920d0556e0522f95479ea95.patch";
@@ -102,10 +94,6 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
postPatch = '' 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 # QT_IMPORTS_DIR returned by qmake -query is broken
substituteInPlace CMakeLists.txt \ substituteInPlace CMakeLists.txt \
--replace-fail 'qmake -query QT_INSTALL_QML' 'echo ''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}' \ --replace-fail 'qmake -query QT_INSTALL_QML' 'echo ''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}' \

View File

@@ -1,57 +1,59 @@
{ stdenv {
, lib stdenv,
, fetchFromGitLab lib,
, fetchpatch fetchFromGitLab,
, fetchpatch2 gitUpdater,
, gitUpdater testers,
, testers accountsservice,
, accountsservice ayatana-indicator-datetime,
, ayatana-indicator-datetime biometryd,
, cmake cmake,
, cmake-extras cmake-extras,
, content-hub content-hub,
, dbus dbus,
, deviceinfo deviceinfo,
, geonames geonames,
, gettext gettext,
, glib glib,
, gnome-desktop gnome-desktop,
, gsettings-qt gsettings-qt,
, gtk3 gtk3,
, icu icu,
, intltool intltool,
, json-glib json-glib,
, libqofono libqofono,
, libqtdbustest libqtdbustest,
, libqtdbusmock libqtdbusmock,
, lomiri-indicator-network lomiri-indicator-network,
, lomiri-schemas lomiri-schemas,
, lomiri-settings-components lomiri-settings-components,
, lomiri-ui-toolkit lomiri-ui-toolkit,
, maliit-keyboard maliit-keyboard,
, pkg-config pkg-config,
, python3 polkit,
, qmenumodel python3,
, qtbase qmenumodel,
, qtdeclarative qtbase,
, qtmultimedia qtdeclarative,
, ubports-click qtmultimedia,
, upower trust-store,
, validatePkgConfig ubports-click,
, wrapGAppsHook3 upower,
, wrapQtAppsHook validatePkgConfig,
, xvfb-run wrapGAppsHook3,
wrapQtAppsHook,
xvfb-run,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-system-settings-unwrapped"; pname = "lomiri-system-settings-unwrapped";
version = "1.1.0"; version = "1.2.0";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "ubports"; owner = "ubports";
repo = "development/core/lomiri-system-settings"; repo = "development/core/lomiri-system-settings";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-Po5eArO7zyaGatTf6kqci3DdzFDJSZakeglbiMx9kR8="; hash = "sha256-dWaXPr9Z5jz5SbwLSd3jVqjK0E5BdcKVeF15p8j47uM=";
}; };
outputs = [ outputs = [
@@ -59,55 +61,9 @@ stdenv.mkDerivation (finalAttrs: {
"dev" "dev"
]; ];
patches = [ patches = [ ./2000-Support-wrapping-for-Nixpkgs.patch ];
# 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=";
})
];
postPatch = '' 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 \ substituteInPlace CMakeLists.txt \
--replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" \ --replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" \
@@ -155,7 +111,9 @@ stdenv.mkDerivation (finalAttrs: {
gtk3 gtk3
icu icu
json-glib json-glib
polkit
qtbase qtbase
trust-store
ubports-click ubports-click
upower upower
]; ];
@@ -163,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
# QML components and schemas the wrapper needs # QML components and schemas the wrapper needs
propagatedBuildInputs = [ propagatedBuildInputs = [
ayatana-indicator-datetime ayatana-indicator-datetime
biometryd
content-hub content-hub
libqofono libqofono
lomiri-indicator-network lomiri-indicator-network
@@ -177,9 +136,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeCheckInputs = [ nativeCheckInputs = [
dbus dbus
(python3.withPackages (ps: with ps; [ (python3.withPackages (ps: with ps; [ python-dbusmock ]))
python-dbusmock
]))
xvfb-run xvfb-run
]; ];
@@ -194,19 +151,21 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [ cmakeFlags = [
(lib.cmakeBool "ENABLE_LIBDEVICEINFO" true) (lib.cmakeBool "ENABLE_LIBDEVICEINFO" true)
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [ (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (
# Exclude tests lib.concatStringsSep ";" [
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [ # Exclude tests
# Hits OpenGL context issue inside lomiri-ui-toolkit, see derivation of that on details "-E"
"^testmouse" (lib.strings.escapeShellArg "(${
"^tst_notifications" 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 # 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. # failing to load their library modules. Force it to report them at linktime instead of runtime.
env.NIX_LDFLAGS = "--unresolved-symbols=report-all"; env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
@@ -218,7 +177,16 @@ stdenv.mkDerivation (finalAttrs: {
preCheck = '' preCheck = ''
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix} 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 = '' postInstall = ''
@@ -244,8 +212,6 @@ stdenv.mkDerivation (finalAttrs: {
mainProgram = "lomiri-system-settings"; mainProgram = "lomiri-system-settings";
maintainers = teams.lomiri.members; maintainers = teams.lomiri.members;
platforms = platforms.linux; platforms = platforms.linux;
pkgConfigModules = [ pkgConfigModules = [ "LomiriSystemSettings" ];
"LomiriSystemSettings"
];
}; };
}) })

View File

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

View File

@@ -1,13 +1,13 @@
{ stdenvNoCC {
, lib stdenvNoCC,
, nixosTests lib,
, glib nixosTests,
, lndir glib,
, lomiri-system-settings-unwrapped lndir,
, lomiri-system-settings-security-privacy lomiri-system-settings-unwrapped,
, wrapGAppsHook3 wrapGAppsHook3,
, wrapQtAppsHook wrapQtAppsHook,
, plugins ? [ lomiri-system-settings-security-privacy ] plugins ? [ ],
}: }:
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {

View File

@@ -1,90 +1,82 @@
{ stdenv {
, lib stdenv,
, fetchFromGitLab lib,
, fetchpatch fetchFromGitLab,
, fetchpatch2 fetchpatch,
, gitUpdater fetchpatch2,
, linkFarm gitUpdater,
, nixosTests linkFarm,
, ayatana-indicator-datetime nixosTests,
, bash ayatana-indicator-datetime,
, biometryd bash,
, boost biometryd,
, cmake boost,
, cmake-extras cmake,
, coreutils cmake-extras,
, dbus coreutils,
, dbus-test-runner dbus,
, deviceinfo dbus-test-runner,
, geonames deviceinfo,
, glib geonames,
, glm glib,
, gnome-desktop glm,
, gsettings-qt gnome-desktop,
, gtk3 gsettings-qt,
, hfd-service gtk3,
, libevdev hfd-service,
, libqtdbustest libevdev,
, libqtdbusmock libqtdbustest,
, libusermetrics libqtdbusmock,
, libuuid libusermetrics,
, lightdm_qt libuuid,
, lomiri-api lightdm_qt,
, lomiri-app-launch lomiri-api,
, lomiri-download-manager lomiri-app-launch,
, lomiri-indicator-network lomiri-download-manager,
, lomiri-ui-toolkit lomiri-indicator-network,
, lomiri-settings-components lomiri-ui-toolkit,
, lomiri-system-settings-unwrapped lomiri-settings-components,
, lomiri-schemas lomiri-system-settings-unwrapped,
, lomiri-notifications lomiri-schemas,
, lomiri-thumbnailer lomiri-notifications,
, maliit-keyboard lomiri-thumbnailer,
, mir_2_15 maliit-keyboard,
, nixos-icons mir_2_15,
, pam nixos-icons,
, pkg-config pam,
, properties-cpp pkg-config,
, protobuf properties-cpp,
, python3 protobuf,
, qmenumodel python3,
, qtbase qmenumodel,
, qtdeclarative qtbase,
, qtmir qtdeclarative,
, qtmultimedia qtmir,
, qtsvg qtmultimedia,
, telephony-service qtsvg,
, wrapGAppsHook3 telephony-service,
, wrapQtAppsHook wrapGAppsHook3,
, xwayland wrapQtAppsHook,
xwayland,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "lomiri"; pname = "lomiri";
version = "0.2.1"; version = "0.3.0";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "ubports"; owner = "ubports";
repo = "development/core/lomiri"; repo = "development/core/lomiri";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-V5Lt870eHgmJ63OF8bTiNFLAFrxdgNihkd7aodSO3v8="; hash = "sha256-Godl/SQ0+NkI6kwH85SXHPQ5GRlih3xvCyeYxwiqH/s=";
}; };
patches = [ patches = [
# Remove when version > 0.2.1 # Remove when version > 0.3.0
(fetchpatch { (fetchpatch {
name = "0001-lomiri-Fix-overwriting-INCLUDE_DIRECTORIES-variable.patch"; name = "0001-lomiri-Fix-accountsservice-test.patch";
url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/53190bf2f03c8a35491efb26222b8d67ff6caa34.patch"; url = "https://gitlab.com/ubports/development/core/lomiri/-/commit/353153c4ebc40ffcc7702af42205d2075fc81503.patch";
hash = "sha256-sbwqOqpTf5OlEB4NZZZTFNXyKq4rTQAxJ6U8YP/DT5s="; hash = "sha256-J9ySZgWd7KR7aU1cCRu5iirq7bi3NdLR9SZs9Pd1I8w=";
})
# 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=";
}) })
# Fix greeter & related settings # Fix greeter & related settings
@@ -116,62 +108,51 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-guq/Ykcq4WcuXxNKO1eA4sJFyGSpZo0gtyFTdeK/GeE="; 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 ./9901-lomiri-Disable-Wizard.patch
./9902-lomiri-Check-NIXOS_XKB_LAYOUTS.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 \ # Part of greeter fix, applies separately due to merge conflicts
--replace-fail '@CMAKE_INSTALL_FULL_BINDIR@/lomiri-greeter-wrapper @CMAKE_INSTALL_FULL_BINDIR@/lomiri --mode=greeter' '@CMAKE_INSTALL_FULL_BINDIR@/lomiri --mode=greeter' \ substituteInPlace data/lomiri-greeter.desktop.in.in \
--replace-fail 'X-LightDM-Session-Type=mir' 'X-LightDM-Session-Type=wayland' --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 # Written with a different qtmir branch in mind, but different branch breaks compat with some patches
for unmovedThing in tests/mocks/MeeGo/QOfono/*; do substituteInPlace CMakeLists.txt \
mv "$unmovedThing" "tests/mocks/QOfono/$(basename "$unmovedThing")" --replace-fail 'qt5mir2server' 'qtmirserver'
done
rmdir tests/mocks/MeeGo/QOfono
rmdir tests/mocks/MeeGo
# Need to replace prefix # Need to replace prefix
substituteInPlace data/systemd-user/CMakeLists.txt \ 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) # 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 \ substituteInPlace data/{indicators-client,lomiri}.desktop.in.in \
--replace-fail '@CMAKE_INSTALL_FULL_BINDIR@/' "" --replace-fail '@CMAKE_INSTALL_FULL_BINDIR@/' ""
# Exclude tests that don't compile (Mir headers these relied on were removed in mir 2.9) # Exclude tests that don't compile (Mir headers these relied on were removed in mir 2.9)
# fatal error: mirtest/mir/test/doubles/stub_surface.h: No such file or directory # fatal error: mirtest/mir/test/doubles/stub_surface.h: No such file or directory
substituteInPlace tests/mocks/CMakeLists.txt \ substituteInPlace tests/mocks/CMakeLists.txt \
--replace-fail 'add_subdirectory(QtMir/Application)' "" --replace-fail 'add_subdirectory(QtMir/Application)' ""
#substituteInPlace plugins/AccountsService/CMakeLists.txt \ # NixOS-ify
# --replace-fail 'CMAKE_INSTALL_DATADIR' 'CMAKE_INSTALL_FULL_DATADIR'
# NixOS-ify # Use Nix flake instead of Canonical's Ubuntu logo
rm qml/Launcher/graphics/home.svg
ln -s ${nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake-white.svg qml/Launcher/graphics/home.svg
# Use Nix flake instead of Canonical's Ubuntu logo # Look up default wallpaper in current system
rm qml/Launcher/graphics/home.svg substituteInPlace plugins/Utils/constants.cpp \
ln -s ${nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake-white.svg qml/Launcher/graphics/home.svg --replace-fail '/usr/share/backgrounds' '/run/current-system/sw/share/wallpapers'
''
# Look up default wallpaper in current system + lib.optionalString finalAttrs.finalPackage.doCheck ''
substituteInPlace plugins/Utils/constants.cpp \ patchShebangs tests/whitespace/check_whitespace.py
--replace-fail '/usr/share/backgrounds' '/run/current-system/sw/share/wallpapers' '';
'' + lib.optionalString finalAttrs.finalPackage.doCheck ''
patchShebangs tests/whitespace/check_whitespace.py
'';
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
dbus-test-runner
glib # populates GSETTINGS_SCHEMAS_PATH glib # populates GSETTINGS_SCHEMAS_PATH
pkg-config pkg-config
wrapGAppsHook3 # XDG_DATA_DIRS wrapper flags for schemas wrapGAppsHook3 # XDG_DATA_DIRS wrapper flags for schemas
@@ -224,11 +205,7 @@ stdenv.mkDerivation (finalAttrs: {
telephony-service telephony-service
]; ];
nativeCheckInputs = [ nativeCheckInputs = [ (python3.withPackages (ps: with ps; [ python-dbusmock ])) ];
(python3.withPackages (ps: with ps; [
python-dbusmock
]))
];
checkInputs = [ checkInputs = [
libqtdbustest libqtdbustest
@@ -243,6 +220,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [ cmakeFlags = [
(lib.cmakeBool "NO_TESTS" (!finalAttrs.finalPackage.doCheck)) (lib.cmakeBool "NO_TESTS" (!finalAttrs.finalPackage.doCheck))
(lib.cmakeBool "WITH_MIR2" true)
]; ];
postInstall = '' postInstall = ''
@@ -266,7 +244,14 @@ stdenv.mkDerivation (finalAttrs: {
wrapQtApp $out/bin/lomiri-mock-indicator-service wrapQtApp $out/bin/lomiri-mock-indicator-service
wrapProgram $out/bin/lomiri-greeter-wrapper \ 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" --set LOMIRI_BINARY "$out/bin/lomiri"
wrapProgram $out/libexec/Xwayland.lomiri \ wrapProgram $out/libexec/Xwayland.lomiri \
@@ -277,12 +262,16 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
passthru = { passthru = {
tests.lomiri = nixosTests.lomiri; tests = {
inherit (nixosTests.lomiri) greeter desktop desktop-ayatana-indicators;
};
updateScript = gitUpdater { }; updateScript = gitUpdater { };
greeter = linkFarm "lomiri-greeter" [{ greeter = linkFarm "lomiri-greeter" [
path = "${finalAttrs.finalPackage}/share/lightdm/greeters/lomiri-greeter.desktop"; {
name = "lomiri-greeter.desktop"; path = "${finalAttrs.finalPackage}/share/lightdm/greeters/lomiri-greeter.desktop";
}]; name = "lomiri-greeter.desktop";
}
];
}; };
meta = with lib; { meta = with lib; {

View File

@@ -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> 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 Subject: [PATCH] Unset QT_QPA_PLATFORMTHEME
gtk3 value breaks Lomiri startup gtk3 value breaks Lomiri startup
--- ---
lomiri-session | 2 ++ lomiri-session.in | 1 +
1 file changed, 2 insertions(+) 1 file changed, 1 insertion(+)
diff --git a/lomiri-session b/lomiri-session diff --git a/lomiri-session.in b/lomiri-session.in
index 9d68249..b103840 100755 index 50dd4cb..ffc20c4 100755
--- a/lomiri-session --- a/lomiri-session.in
+++ b/lomiri-session +++ b/lomiri-session.in
@@ -47,6 +47,7 @@ fi @@ -55,6 +55,7 @@ dbus-update-activation-environment --systemd MALIIT_FORCE_DBUS_CONNECTION=1
# 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
dbus-update-activation-environment --systemd QT_IM_MODULE=maliit dbus-update-activation-environment --systemd QT_IM_MODULE=maliit
dbus-update-activation-environment --systemd GTK_IM_MODULE=maliit dbus-update-activation-environment --systemd GTK_IM_MODULE=maliit
dbus-update-activation-environment --systemd QT_QPA_PLATFORM=wayland dbus-update-activation-environment --systemd QT_QPA_PLATFORM=wayland

View File

@@ -1,153 +1,40 @@
{ stdenvNoCC {
, lib stdenvNoCC,
, fetchFromGitLab lib,
, fetchpatch fetchFromGitLab,
, fetchpatch2 gitUpdater,
, gitUpdater nixosTests,
, nixosTests bash,
, bash cmake,
, cmake dbus,
, dbus deviceinfo,
, deviceinfo inotify-tools,
, inotify-tools lomiri,
, lomiri makeWrapper,
, makeWrapper pkg-config,
, pkg-config runtimeShell,
, runtimeShell systemd,
, systemd
}: }:
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "lomiri-session"; pname = "lomiri-session";
version = "0.2"; version = "0.3";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "ubports"; owner = "ubports";
repo = "development/core/lomiri-session"; repo = "development/core/lomiri-session";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-1ZpAn1tFtlXIfeejG0TnrJBRjf3tyz7CD+riWo+sd0s="; hash = "sha256-XduE3tPUjw/wIjFCACasxtN33KO4bDLWrpl7pZcYaAA=";
}; };
patches = [ patches = [ ./1001-Unset-QT_QPA_PLATFORMTHEME.patch ];
# 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
];
postPatch = '' postPatch = ''
# Resolving merge conflict substituteInPlace lomiri-session.in \
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 \
--replace-fail '/usr/libexec/Xwayland.lomiri' '${lib.getBin lomiri}/libexec/Xwayland.lomiri' --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 = [ nativeBuildInputs = [
@@ -173,7 +60,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
postInstall = '' postInstall = ''
patchShebangs $out/bin/lomiri-session patchShebangs $out/bin/lomiri-session
wrapProgram $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 = { passthru = {

View File

@@ -1,65 +1,72 @@
{ lib {
, pkgs config,
, libsForQt5 lib,
pkgs,
libsForQt5,
}: }:
let let
packages = self: let packages =
inherit (self) callPackage; self:
in { let
#### Core Apps inherit (self) callPackage;
lomiri = callPackage ./applications/lomiri { }; in
lomiri-calculator-app = callPackage ./applications/lomiri-calculator-app { }; {
lomiri-camera-app = callPackage ./applications/lomiri-camera-app { }; #### Core Apps
lomiri-clock-app = callPackage ./applications/lomiri-clock-app { }; lomiri = callPackage ./applications/lomiri { };
lomiri-filemanager-app = callPackage ./applications/lomiri-filemanager-app { }; lomiri-calculator-app = callPackage ./applications/lomiri-calculator-app { };
lomiri-system-settings-unwrapped = callPackage ./applications/lomiri-system-settings { }; lomiri-camera-app = callPackage ./applications/lomiri-camera-app { };
lomiri-system-settings-security-privacy = callPackage ./applications/lomiri-system-settings/plugins/lomiri-system-settings-security-privacy.nix { }; lomiri-clock-app = callPackage ./applications/lomiri-clock-app { };
lomiri-system-settings = callPackage ./applications/lomiri-system-settings/wrapper.nix { }; lomiri-filemanager-app = callPackage ./applications/lomiri-filemanager-app { };
lomiri-terminal-app = callPackage ./applications/lomiri-terminal-app { }; lomiri-system-settings-unwrapped = callPackage ./applications/lomiri-system-settings { };
morph-browser = callPackage ./applications/morph-browser { }; lomiri-system-settings = callPackage ./applications/lomiri-system-settings/wrapper.nix { };
teleports = callPackage ./applications/teleports { }; lomiri-terminal-app = callPackage ./applications/lomiri-terminal-app { };
morph-browser = callPackage ./applications/morph-browser { };
teleports = callPackage ./applications/teleports { };
#### Data #### Data
lomiri-schemas = callPackage ./data/lomiri-schemas { }; lomiri-schemas = callPackage ./data/lomiri-schemas { };
lomiri-session = callPackage ./data/lomiri-session { }; lomiri-session = callPackage ./data/lomiri-session { };
lomiri-sounds = callPackage ./data/lomiri-sounds { }; lomiri-sounds = callPackage ./data/lomiri-sounds { };
lomiri-wallpapers = callPackage ./data/lomiri-wallpapers { }; lomiri-wallpapers = callPackage ./data/lomiri-wallpapers { };
suru-icon-theme = callPackage ./data/suru-icon-theme { }; suru-icon-theme = callPackage ./data/suru-icon-theme { };
#### Development tools / libraries #### Development tools / libraries
cmake-extras = callPackage ./development/cmake-extras { }; cmake-extras = callPackage ./development/cmake-extras { };
deviceinfo = callPackage ./development/deviceinfo { }; deviceinfo = callPackage ./development/deviceinfo { };
geonames = callPackage ./development/geonames { }; geonames = callPackage ./development/geonames { };
gmenuharness = callPackage ./development/gmenuharness { }; gmenuharness = callPackage ./development/gmenuharness { };
libusermetrics = callPackage ./development/libusermetrics { }; libusermetrics = callPackage ./development/libusermetrics { };
lomiri-api = callPackage ./development/lomiri-api { }; lomiri-api = callPackage ./development/lomiri-api { };
lomiri-app-launch = callPackage ./development/lomiri-app-launch { }; lomiri-app-launch = callPackage ./development/lomiri-app-launch { };
qtmir = callPackage ./development/qtmir { }; qtmir = callPackage ./development/qtmir { };
trust-store = callPackage ./development/trust-store { }; trust-store = callPackage ./development/trust-store { };
u1db-qt = callPackage ./development/u1db-qt { }; u1db-qt = callPackage ./development/u1db-qt { };
#### QML / QML-related #### QML / QML-related
lomiri-action-api = callPackage ./qml/lomiri-action-api { }; lomiri-action-api = callPackage ./qml/lomiri-action-api { };
lomiri-notifications = callPackage ./qml/lomiri-notifications { }; lomiri-notifications = callPackage ./qml/lomiri-notifications { };
lomiri-push-qml = callPackage ./qml/lomiri-push-qml { }; lomiri-push-qml = callPackage ./qml/lomiri-push-qml { };
lomiri-settings-components = callPackage ./qml/lomiri-settings-components { }; lomiri-settings-components = callPackage ./qml/lomiri-settings-components { };
lomiri-ui-extras = callPackage ./qml/lomiri-ui-extras { }; lomiri-ui-extras = callPackage ./qml/lomiri-ui-extras { };
lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { }; lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { };
qqc2-suru-style = callPackage ./qml/qqc2-suru-style { }; qqc2-suru-style = callPackage ./qml/qqc2-suru-style { };
#### Services #### Services
biometryd = callPackage ./services/biometryd { }; biometryd = callPackage ./services/biometryd { };
content-hub = callPackage ./services/content-hub { }; content-hub = callPackage ./services/content-hub { };
hfd-service = callPackage ./services/hfd-service { }; hfd-service = callPackage ./services/hfd-service { };
history-service = callPackage ./services/history-service { }; history-service = callPackage ./services/history-service { };
lomiri-download-manager = callPackage ./services/lomiri-download-manager { }; lomiri-download-manager = callPackage ./services/lomiri-download-manager { };
lomiri-indicator-network = callPackage ./services/lomiri-indicator-network { }; lomiri-indicator-network = callPackage ./services/lomiri-indicator-network { };
lomiri-polkit-agent = callPackage ./services/lomiri-polkit-agent { }; lomiri-polkit-agent = callPackage ./services/lomiri-polkit-agent { };
lomiri-thumbnailer = callPackage ./services/lomiri-thumbnailer { }; lomiri-thumbnailer = callPackage ./services/lomiri-thumbnailer { };
lomiri-url-dispatcher = callPackage ./services/lomiri-url-dispatcher { }; lomiri-url-dispatcher = callPackage ./services/lomiri-url-dispatcher { };
mediascanner2 = callPackage ./services/mediascanner2 { }; mediascanner2 = callPackage ./services/mediascanner2 { };
telephony-service = callPackage ./services/telephony-service { }; telephony-service = callPackage ./services/telephony-service { };
}; };
in in
lib.makeScope libsForQt5.newScope packages 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
}

View File

@@ -136,11 +136,16 @@ stdenv.mkDerivation (finalAttrs: {
# Exclude tests # Exclude tests
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [ "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
# Flaky, randomly failing to launch properly & stuck until test timeout # Flaky, randomly failing to launch properly & stuck until test timeout
# https://gitlab.com/ubports/development/core/lomiri-telephony-service/-/issues/70
"^HandlerTest" "^HandlerTest"
"^OfonoAccountEntryTest" "^OfonoAccountEntryTest"
"^TelepathyHelperSetupTest" "^TelepathyHelperSetupTest"
"^AuthHandlerTest" "^AuthHandlerTest"
"^ChatManagerTest" "^ChatManagerTest"
"^AccountEntryTest"
"^AccountEntryFactoryTest"
"^PresenceRequestTest"
"^CallEntryTest"
]})") ]})")
])) ]))
]; ];