Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deltatouch: init at 1.4.0 #289642

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11403,6 +11403,13 @@
fingerprint = "80EE AAD8 43F9 3097 24B5 3D7E 27E9 7B91 E63A 7FF8";
}];
};
link2xt = {
email = "[email protected]";
githubId = 18373967;
github = "link2xt";
matrix = "@link2xt:matrix.org";
name = "link2xt";
};
linquize = {
email = "[email protected]";
github = "linquize";
Expand Down
91 changes: 91 additions & 0 deletions pkgs/by-name/de/deltatouch/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{ lib
, stdenv
, fetchFromGitea
link2xt marked this conversation as resolved.
Show resolved Hide resolved
, fetchpatch
, cmake
, intltool
, libdeltachat
, lomiri
, qt5
, quirc
}:

stdenv.mkDerivation (finalAttrs: {
pname = "deltatouch";
version = "1.4.0";

src = fetchFromGitea {
domain = "codeberg.org";
owner = "lk108";
repo = "deltatouch";
rev = "v${finalAttrs.version}";
hash = "sha256-tqcQmFmF8Z9smVMfaXOmXQ3Uw41bUcU4iUi8fxBlg8U=";
fetchSubmodules = true;
};


patches = [
(fetchpatch {
name = "0001-deltatouch-Fix-localisation.patch";
url = "https://codeberg.org/lk108/deltatouch/commit/dcfdd8a0fca5fff10d0383f77f4c0cbea302de00.patch";
hash = "sha256-RRjHG/xKtj757ZP2SY0GtWwh66kkTWoICV1vDkFAw3k=";
})
];

nativeBuildInputs = [
link2xt marked this conversation as resolved.
Show resolved Hide resolved
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
link2xt marked this conversation as resolved.
Show resolved Hide resolved
lomiri.qqc2-suru-style
];
link2xt marked this conversation as resolved.
Show resolved Hide resolved

postPatch = ''
# Fix all sorts of install locations
substituteInPlace CMakeLists.txt \
--replace-fail 'set(DATA_DIR /)' 'set(DATA_DIR ''${CMAKE_INSTALL_DATAROOTDIR})' \
--replace-fail 'RUNTIME DESTINATION ''${CMAKE_INSTALL_PREFIX}' 'RUNTIME DESTINATION ''${CMAKE_INSTALL_BINDIR}' \
--replace-fail 'assets/logo.svg DESTINATION assets' 'assets/logo.svg DESTINATION ''${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps RENAME deltatouch.svg' \
--replace-fail "\''${DESKTOP_FILE_NAME} DESTINATION \''${DATA_DIR}" "\''${DESKTOP_FILE_NAME} DESTINATION \''${CMAKE_INSTALL_DATAROOTDIR}/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}")'

# 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"'

# Fix icon reference in desktop file
substituteInPlace deltatouch.desktop.in \
--replace-fail 'Icon=assets/logo.svg' 'Icon=deltatouch'
'';

postInstall = ''
# Remove clickable metadata & helpers from out
rm $out/{manifest.json,share/push*}
'';

meta = with lib; {
changelog = "https://codeberg.org/lk108/deltatouch/src/commit/${finalAttrs.src.rev}/CHANGELOG";
description = "Messaging app for Ubuntu Touch, powered by Delta Chat core";
link2xt marked this conversation as resolved.
Show resolved Hide resolved
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;
};
})