-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deltatouch: init at 1.3.1-unstable-2024-02-25
Co-Authored-By: matthewcroughan <matt@croughan.sh>
- Loading branch information
1 parent
672f6b1
commit 35bc2a7
Showing
1 changed file
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitea | ||
, cmake | ||
, intltool | ||
, libdeltachat | ||
, lomiri | ||
, qt5 | ||
, quirc | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "deltatouch"; | ||
version = "1.3.1-unstable-2024-02-25"; | ||
|
||
src = fetchFromGitea { | ||
domain = "codeberg.org"; | ||
owner = "lk108"; | ||
repo = "deltatouch"; | ||
rev = "dd86a77291a6e9f1c363e7cdf5999e58fb5b84e5"; | ||
hash = "sha256-03J2YLXF1uDnTmDsrxWjlfDsN7mcc68MbWy/HTIcM2E="; | ||
fetchSubmodules = true; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
qt5.wrapQtAppsHook | ||
intltool | ||
cmake | ||
]; | ||
|
||
buildInputs = [ | ||
qt5.qtbase | ||
qt5.qtwebengine | ||
qt5.qtquickcontrols2 | ||
lomiri.lomiri-ui-toolkit | ||
lomiri.lomiri-ui-extras | ||
lomiri.lomiri-api | ||
lomiri.lomiri-indicator-network # Lomiri.Connectivity module | ||
lomiri.qqc2-suru-style | ||
]; | ||
|
||
postPatch = '' | ||
# Fix all sorts of install locations | ||
substituteInPlace CMakeLists.txt \ | ||
--replace-fail 'set(DATA_DIR /)' "set(DATA_DIR $out/share)" \ | ||
--replace-fail 'RUNTIME DESTINATION ''${CMAKE_INSTALL_PREFIX}' 'RUNTIME DESTINATION ''${CMAKE_INSTALL_PREFIX}/bin' \ | ||
--replace-fail 'assets/logo.svg DESTINATION assets' 'assets/logo.svg DESTINATION ''${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps RENAME deltatouch.svg' \ | ||
--replace-fail "\''${DESKTOP_FILE_NAME} DESTINATION \''${DATA_DIR}" "\''${DESKTOP_FILE_NAME} DESTINATION \''${CMAKE_INSTALL_PREFIX}/share/applications" | ||
substituteInPlace plugins/DeltaHandler/CMakeLists.txt plugins/DTWebEngineProfile/CMakeLists.txt \ | ||
--replace-fail 'set(QT_IMPORTS_DIR "/lib/''${ARCH_TRIPLET}")' 'set(QT_IMPORTS_DIR "${placeholder "out"}/${qt5.qtbase.qtQmlPrefix}")' | ||
substituteInPlace po/CMakeLists.txt \ | ||
--replace-fail 'INSTALL_DIR ''${CMAKE_INSTALL_LOCALEDIR}/share/locale' 'INSTALL_DIR ''${CMAKE_INSTALL_LOCALEDIR}' | ||
# Fix import of library dependencies | ||
substituteInPlace plugins/DeltaHandler/CMakeLists.txt \ | ||
--replace-fail 'IMPORTED_LOCATION "''${CMAKE_CURRENT_BINARY_DIR}/libdeltachat.so"' 'IMPORTED_LOCATION "${lib.getLib libdeltachat}/lib/libdeltachat.so"' \ | ||
--replace-fail 'IMPORTED_LOCATION "''${CMAKE_CURRENT_BINARY_DIR}/libquirc.so.1.2"' 'IMPORTED_LOCATION "${lib.getLib quirc}/lib/libquirc.so.1.0"' | ||
# Fix icon reference in desktop file | ||
substituteInPlace deltatouch.desktop.in \ | ||
--replace-fail 'Icon=assets/logo.svg' 'Icon=deltatouch' | ||
# Make localisation work | ||
substituteInPlace qml/Main.qml \ | ||
--replace-fail 'Component.onCompleted: {' 'Component.onCompleted: { | ||
i18n.domain = "deltatouch.lotharketterer" | ||
i18n.bindtextdomain("deltatouch.lotharketterer", "${placeholder "out"}/share/locale")' | ||
''; | ||
|
||
postInstall = '' | ||
# Remove clickable metadata & helpers from out | ||
rm $out/{manifest.json,share/push*} | ||
''; | ||
|
||
qtWrapperArgs = [ | ||
''--set CLICKABLE_DESKTOP_MODE y'' # Hack to make sending/receiving messages work, we don't use clickable | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Messaging app for Ubuntu Touch, powered by Delta Chat core"; | ||
longDescription = '' | ||
DeltaTouch is a messenger for Ubuntu Touch based on Delta Chat core. | ||
Delta Chat works over email. | ||
''; | ||
homepage = "https://codeberg.org/lk108/deltatouch"; | ||
license = licenses.gpl3Plus; | ||
maintainers = with maintainers; [ link2xt ]; | ||
mainProgram = "deltatouch"; | ||
platforms = platforms.linux; | ||
}; | ||
} |