Skip to content

Commit

Permalink
lomiri.lomiri-terminal-app: Fetch upstream-submitted patches
Browse files Browse the repository at this point in the history
  • Loading branch information
OPNA2608 committed Jan 15, 2024
1 parent 22aed12 commit 6d8373b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 68 deletions.

This file was deleted.

31 changes: 26 additions & 5 deletions pkgs/desktops/lomiri/applications/lomiri-terminal-app/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, nixosTests
, cmake
Expand All @@ -27,15 +28,34 @@ stdenv.mkDerivation (finalAttrs: {
};

patches = [
# Fix CMake code not using the (intended? correct? working?) mechanism for depending on Qt modules
./0001-Drop-deprecated-qt5_use_modules.patch
# Stop usage of private qt5_use_modules function, seemingly unavailable in this package
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/103 merged & in release
(fetchpatch {
name = "0001-lomiri-terminal-app-Stop-using-qt5_use_modules.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/db210c74e771a427066aebdc3a99cab6e782d326.patch";
hash = "sha256-op4+/eo8rBRMcW6MZ0rOEFReM7JBCck1B+AsgAPyqAI=";
})

# Explicitly bind textdomain, don't rely on hacky workaround in LUITK
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/104 merged & in release
(fetchpatch {
name = "0002-lomiri-terminal-app-Call-i18n.bindtextdomain.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/7f9d419e29043f0d0922d2ac1dce5673e2723a01.patch";
hash = "sha256-HfIvGVbIdTasoHAfHysnzFLufQQ4lskym5HTekH+mjk=";
})

# Add more & correct existing usage of GNUInstallDirs variables
# Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/105 merged & in release
(fetchpatch {
name = "0003-lomiri-terminal-app-GNUInstallDirs-usage.patch";
url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/fcde1f05bb442c74b1dff95917fd7594f26e97a7.patch";
hash = "sha256-umxCMGNjyz0TVmwH0Gl0MpgjLQtkW9cHkUfpNJcoasE=";
})
];

postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" '${qtbase.qtQmlPrefix}' \
--replace "\''${CMAKE_INSTALL_PREFIX}/\''${DATA_DIR}" "\''${CMAKE_INSTALL_FULL_DATADIR}/lomiri-terminal-app" \
--replace 'EXEC "''${APP_NAME}"' 'EXEC "${placeholder "out"}/bin/''${APP_NAME}"'
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
# Tests look abandoned - add_test in CMake code is commented out, refers to old repo structure in import paths
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
Expand Down Expand Up @@ -77,6 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
description = "A terminal app for desktop and mobile devices";
homepage = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app";
license = licenses.gpl3Only;
mainProgram = "lomiri-terminal-app";
maintainers = teams.lomiri.members;
platforms = platforms.linux;
};
Expand Down

0 comments on commit 6d8373b

Please sign in to comment.