Merge pull request #321047 from dotlambda/deltachat-desktop
This commit is contained in:
commit
c4b37b291a
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "deltachat-cursed";
|
pname = "deltachat-cursed";
|
||||||
version = "0.8.0";
|
version = "0.9.0";
|
||||||
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
@ -15,17 +15,17 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
owner = "adbenitez";
|
owner = "adbenitez";
|
||||||
repo = "deltachat-cursed";
|
repo = "deltachat-cursed";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-1QNhNPa6ZKn0lGQXs/cmfdSFHscwlYwFC/2DpnMoHvY=";
|
hash = "sha256-z4JKe5soR4FdIn8hugxtnxQr/9V8m8a7QRzE1liIexc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with python3.pythonOnBuildForHost.pkgs; [
|
build-system = with python3.pythonOnBuildForHost.pkgs; [
|
||||||
setuptools
|
setuptools
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
dependencies = with python3.pkgs; [
|
||||||
appdirs
|
appdirs
|
||||||
deltachat
|
deltachat2
|
||||||
emoji
|
emoji
|
||||||
notify-py
|
notify-py
|
||||||
setuptools # for pkg_resources
|
setuptools # for pkg_resources
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildNpmPackage
|
, buildNpmPackage
|
||||||
, copyDesktopItems
|
, copyDesktopItems
|
||||||
, electron_28
|
, electron
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, esbuild
|
, esbuild
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, jq
|
, jq
|
||||||
|
, deltachat-rpc-server
|
||||||
, libdeltachat
|
, libdeltachat
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
@ -36,16 +37,16 @@ let
|
|||||||
in
|
in
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
pname = "deltachat-desktop";
|
pname = "deltachat-desktop";
|
||||||
version = "1.44.1";
|
version = "1.46.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "deltachat";
|
owner = "deltachat";
|
||||||
repo = "deltachat-desktop";
|
repo = "deltachat-desktop";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-fL+9oPQ5dAgvQREZ7A+hKo2MnZKeVvadQDvDPsDNbnQ=";
|
hash = "sha256-90/Wmh0h75i3kvqj3Wo+A3KlKW8LLDWfPza2gDrDY6E=";
|
||||||
};
|
};
|
||||||
|
|
||||||
npmDepsHash = "sha256-rUxJLDsAfp+brecTThYTdHIVIfVkKwZ/W5sHV0hHHIk=";
|
npmDepsHash = "sha256-UzWxMd+DYH5A8Zo1rzi8oIsoKbmzsVbGpr3uWtc02rY=";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
test \
|
test \
|
||||||
@ -64,6 +65,7 @@ buildNpmPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
deltachat-rpc-server
|
||||||
libdeltachat
|
libdeltachat
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
CoreServices
|
CoreServices
|
||||||
@ -77,7 +79,8 @@ buildNpmPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
rm -r node_modules/deltachat-node/node/prebuilds
|
rm node_modules/@deltachat/stdio-rpc-server-*/deltachat-rpc-server
|
||||||
|
ln -s ${lib.getExe deltachat-rpc-server} node_modules/@deltachat/stdio-rpc-server-linux-*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
npmBuildScript = "build4production";
|
npmBuildScript = "build4production";
|
||||||
@ -93,6 +96,9 @@ buildNpmPackage rec {
|
|||||||
awk '!/^#/ && NF' build/packageignore_list \
|
awk '!/^#/ && NF' build/packageignore_list \
|
||||||
| xargs -I {} sh -c "rm -rf $out/lib/node_modules/deltachat-desktop/{}" || true
|
| xargs -I {} sh -c "rm -rf $out/lib/node_modules/deltachat-desktop/{}" || true
|
||||||
|
|
||||||
|
# required for electron to import index.js as a module
|
||||||
|
cp package.json $out/lib/node_modules/deltachat-desktop
|
||||||
|
|
||||||
install -D build/icon.png \
|
install -D build/icon.png \
|
||||||
$out/share/icons/hicolor/scalable/apps/deltachat.png
|
$out/share/icons/hicolor/scalable/apps/deltachat.png
|
||||||
|
|
||||||
@ -103,7 +109,7 @@ buildNpmPackage rec {
|
|||||||
$out/lib/node_modules/deltachat-desktop/html-dist/fonts
|
$out/lib/node_modules/deltachat-desktop/html-dist/fonts
|
||||||
done
|
done
|
||||||
|
|
||||||
makeWrapper ${lib.getExe electron_28} $out/bin/deltachat \
|
makeWrapper ${lib.getExe electron} $out/bin/deltachat \
|
||||||
--set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher${stdenv.hostPlatform.extensions.sharedLibrary} \
|
--set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher${stdenv.hostPlatform.extensions.sharedLibrary} \
|
||||||
--add-flags $out/lib/node_modules/deltachat-desktop
|
--add-flags $out/lib/node_modules/deltachat-desktop
|
||||||
|
|
||||||
|
2332
pkgs/development/libraries/libdeltachat/Cargo.lock
generated
2332
pkgs/development/libraries/libdeltachat/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -31,13 +31,13 @@ let
|
|||||||
};
|
};
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "libdeltachat";
|
pname = "libdeltachat";
|
||||||
version = "1.136.3";
|
version = "1.140.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "deltachat";
|
owner = "deltachat";
|
||||||
repo = "deltachat-core-rust";
|
repo = "deltachat-core-rust";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-/ZWpPpxnOCLGswrfbEPvfUn1LpdBQeR5LecRAB0PEhI=";
|
hash = "sha256-BSbvgKiI89B+nxp5McBKTJAwgePt27C1QvSQLhTL7pQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 44ca43e7..8b6960dd 100644
|
index 5587e391..a18092f5 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -14,7 +14,6 @@ find_program(CARGO cargo)
|
@@ -20,7 +20,6 @@ endif()
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
- "target/release/libdeltachat.a"
|
- "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a"
|
||||||
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
"${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||||
"target/release/pkgconfig/deltachat.pc"
|
"${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc"
|
||||||
COMMAND
|
COMMAND
|
||||||
@@ -39,12 +38,10 @@ add_custom_target(
|
@@ -35,12 +34,10 @@ add_custom_target(
|
||||||
lib_deltachat
|
lib_deltachat
|
||||||
ALL
|
ALL
|
||||||
DEPENDS
|
DEPENDS
|
||||||
- "target/release/libdeltachat.a"
|
- "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a"
|
||||||
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
"${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||||
"target/release/pkgconfig/deltachat.pc"
|
"${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
-install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
|
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
|
||||||
index de0fbafe..120efec9 100644
|
index d66cb00f..48347a48 100644
|
||||||
--- a/deltachat-ffi/Cargo.toml
|
--- a/deltachat-ffi/Cargo.toml
|
||||||
+++ b/deltachat-ffi/Cargo.toml
|
+++ b/deltachat-ffi/Cargo.toml
|
||||||
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]
|
@@ -11,7 +11,7 @@ categories = ["cryptography", "std", "email"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "deltachat"
|
name = "deltachat"
|
||||||
|
42
pkgs/development/python-modules/deltachat2/default.nix
Normal file
42
pkgs/development/python-modules/deltachat2/default.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildPythonPackage
|
||||||
|
, deltachat-rpc-server
|
||||||
|
, libdeltachat
|
||||||
|
, setuptools-scm
|
||||||
|
, substituteAll
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "deltachat2";
|
||||||
|
version = "0.6.2";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "adbenitez";
|
||||||
|
repo = "deltachat2";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
hash = "sha256-bp4bi+EeMaWP8zOaPp0eaPKn71F055QgMOOSDzIJUH4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
|
src = ./paths.patch;
|
||||||
|
deltachatrpcserver = lib.getExe deltachat-rpc-server;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "deltachat2" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Client library for Delta Chat core JSON-RPC interface";
|
||||||
|
homepage = "https://github.com/adbenitez/deltachat2";
|
||||||
|
license = lib.licenses.mpl20;
|
||||||
|
mainProgram = "deltachat2";
|
||||||
|
inherit (libdeltachat.meta) maintainers;
|
||||||
|
};
|
||||||
|
}
|
13
pkgs/development/python-modules/deltachat2/paths.patch
Normal file
13
pkgs/development/python-modules/deltachat2/paths.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/deltachat2/transport.py b/deltachat2/transport.py
|
||||||
|
index a93dc7e..251947b 100644
|
||||||
|
--- a/deltachat2/transport.py
|
||||||
|
+++ b/deltachat2/transport.py
|
||||||
|
@@ -71,7 +71,7 @@ class IOTransport:
|
||||||
|
# `process_group` is not supported before Python 3.11.
|
||||||
|
kwargs = {"preexec_fn": os.setpgrp, **self._kwargs} # noqa: PLW1509
|
||||||
|
self.process = subprocess.Popen( # noqa: R1732
|
||||||
|
- "deltachat-rpc-server",
|
||||||
|
+ "@deltachatrpcserver@",
|
||||||
|
stdin=subprocess.PIPE,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
**kwargs,
|
@ -3636,6 +3636,7 @@ with pkgs;
|
|||||||
dell-command-configure = callPackage ../tools/system/dell-command-configure { };
|
dell-command-configure = callPackage ../tools/system/dell-command-configure { };
|
||||||
|
|
||||||
deltachat-desktop = callPackage ../applications/networking/instant-messengers/deltachat-desktop {
|
deltachat-desktop = callPackage ../applications/networking/instant-messengers/deltachat-desktop {
|
||||||
|
electron = electron_30;
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2957,6 +2957,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
deltachat = callPackage ../development/python-modules/deltachat { };
|
deltachat = callPackage ../development/python-modules/deltachat { };
|
||||||
|
|
||||||
|
deltachat2 = callPackage ../development/python-modules/deltachat2 { };
|
||||||
|
|
||||||
deluge-client = callPackage ../development/python-modules/deluge-client { };
|
deluge-client = callPackage ../development/python-modules/deluge-client { };
|
||||||
|
|
||||||
demes = callPackage ../development/python-modules/demes { };
|
demes = callPackage ../development/python-modules/demes { };
|
||||||
|
Loading…
Reference in New Issue
Block a user