Skip to content

Commit

Permalink
deltatouch: init at 1.3.1-unstable-2024-02-25
Browse files Browse the repository at this point in the history
Co-Authored-By: matthewcroughan <matt@croughan.sh>
  • Loading branch information
link2xt and MatthewCroughan committed Feb 29, 2024
1 parent da26c82 commit 5944619
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions pkgs/by-name/de/deltatouch/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{ lib
, stdenv
, fetchFromGitea
, cmake
, intltool
, libdeltachat
, qt5
, quirc
, lomiri
}:

stdenv.mkDerivation rec {
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
];

patchPhase = ''
mkdir -p $out/share
mkdir -p $out/lib
substituteInPlace CMakeLists.txt --replace "set(DATA_DIR /)" "set(DATA_DIR $out/share)"
substituteInPlace plugins/DeltaHandler/CMakeLists.txt --replace '/lib/' '${placeholder "out"}/lib/'
substituteInPlace plugins/DTWebEngineProfile/CMakeLists.txt --replace '/lib/' '${placeholder "out"}/lib/'
mkdir -p build/plugins/DeltaHandler
cp --no-preserve=mode ${libdeltachat}/lib/libdeltachat.so build/plugins/DeltaHandler/libdeltachat.so
cp --no-preserve=mode ${quirc}/lib/libquirc.so.1.0 build/plugins/DeltaHandler/libquirc.so.1.2
'';

postInstall = ''
mkdir -p $out/bin
mv $out/deltatouch $out/bin
cp --no-preserve=mode ${libdeltachat}/lib/libdeltachat.so $out/lib/libdeltachat.so
cp --no-preserve=mode ${quirc}/lib/libquirc.so.1.0 $out/lib/libquirc.so.1.2
'';

qtWrapperArgs = [
''--prefix QML2_IMPORT_PATH : ${placeholder "out"}/lib''
''--set CLICKABLE_DESKTOP_MODE y'' # Hack to make sending/receiving messages work, we don't use clickable
];

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
];

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

0 comments on commit 5944619

Please sign in to comment.