lomiri.lomiri: 0.2.1 -> 0.3.0

This commit is contained in:
OPNA2608 2024-08-03 14:13:10 +02:00
parent ce6dff1fdd
commit 2570743d81

View File

@ -61,30 +61,21 @@
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,14 +107,6 @@ 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
];
@ -134,16 +117,13 @@ stdenv.mkDerivation (finalAttrs: {
--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 +134,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
@ -172,6 +149,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
dbus-test-runner
glib # populates GSETTINGS_SCHEMAS_PATH
pkg-config
wrapGAppsHook3 # XDG_DATA_DIRS wrapper flags for schemas
@ -243,6 +221,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
(lib.cmakeBool "NO_TESTS" (!finalAttrs.finalPackage.doCheck))
(lib.cmakeBool "WITH_MIR2" true)
];
postInstall = ''