mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
Merge pull request #321047 from dotlambda/deltachat-desktop
This commit is contained in:
commit
c4b37b291a
@ -7,7 +7,7 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "deltachat-cursed";
|
||||
version = "0.8.0";
|
||||
version = "0.9.0";
|
||||
|
||||
pyproject = true;
|
||||
|
||||
@ -15,17 +15,17 @@ python3.pkgs.buildPythonApplication rec {
|
||||
owner = "adbenitez";
|
||||
repo = "deltachat-cursed";
|
||||
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-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3.pkgs; [
|
||||
appdirs
|
||||
deltachat
|
||||
deltachat2
|
||||
emoji
|
||||
notify-py
|
||||
setuptools # for pkg_resources
|
||||
|
@ -1,11 +1,12 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, copyDesktopItems
|
||||
, electron_28
|
||||
, electron
|
||||
, buildGoModule
|
||||
, esbuild
|
||||
, fetchFromGitHub
|
||||
, jq
|
||||
, deltachat-rpc-server
|
||||
, libdeltachat
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
@ -36,16 +37,16 @@ let
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "deltachat-desktop";
|
||||
version = "1.44.1";
|
||||
version = "1.46.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deltachat";
|
||||
repo = "deltachat-desktop";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-fL+9oPQ5dAgvQREZ7A+hKo2MnZKeVvadQDvDPsDNbnQ=";
|
||||
hash = "sha256-90/Wmh0h75i3kvqj3Wo+A3KlKW8LLDWfPza2gDrDY6E=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-rUxJLDsAfp+brecTThYTdHIVIfVkKwZ/W5sHV0hHHIk=";
|
||||
npmDepsHash = "sha256-UzWxMd+DYH5A8Zo1rzi8oIsoKbmzsVbGpr3uWtc02rY=";
|
||||
|
||||
postPatch = ''
|
||||
test \
|
||||
@ -64,6 +65,7 @@ buildNpmPackage rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
deltachat-rpc-server
|
||||
libdeltachat
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
CoreServices
|
||||
@ -77,7 +79,8 @@ buildNpmPackage rec {
|
||||
};
|
||||
|
||||
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";
|
||||
@ -93,6 +96,9 @@ buildNpmPackage rec {
|
||||
awk '!/^#/ && NF' build/packageignore_list \
|
||||
| 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 \
|
||||
$out/share/icons/hicolor/scalable/apps/deltachat.png
|
||||
|
||||
@ -103,7 +109,7 @@ buildNpmPackage rec {
|
||||
$out/lib/node_modules/deltachat-desktop/html-dist/fonts
|
||||
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} \
|
||||
--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 {
|
||||
pname = "libdeltachat";
|
||||
version = "1.136.3";
|
||||
version = "1.140.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deltachat";
|
||||
repo = "deltachat-core-rust";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-/ZWpPpxnOCLGswrfbEPvfUn1LpdBQeR5LecRAB0PEhI=";
|
||||
hash = "sha256-BSbvgKiI89B+nxp5McBKTJAwgePt27C1QvSQLhTL7pQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -1,33 +1,33 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 44ca43e7..8b6960dd 100644
|
||||
index 5587e391..a18092f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,7 +14,6 @@ find_program(CARGO cargo)
|
||||
@@ -20,7 +20,6 @@ endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
- "target/release/libdeltachat.a"
|
||||
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"target/release/pkgconfig/deltachat.pc"
|
||||
- "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a"
|
||||
"${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc"
|
||||
COMMAND
|
||||
@@ -39,12 +38,10 @@ add_custom_target(
|
||||
@@ -35,12 +34,10 @@ add_custom_target(
|
||||
lib_deltachat
|
||||
ALL
|
||||
DEPENDS
|
||||
- "target/release/libdeltachat.a"
|
||||
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"target/release/pkgconfig/deltachat.pc"
|
||||
- "${CMAKE_BINARY_DIR}/target/release/libdeltachat.a"
|
||||
"${CMAKE_BINARY_DIR}/target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"${CMAKE_BINARY_DIR}/target/release/pkgconfig/deltachat.pc"
|
||||
)
|
||||
|
||||
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES "target/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/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES "${CMAKE_BINARY_DIR}/target/${ARCH_DIR}/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
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
|
||||
index de0fbafe..120efec9 100644
|
||||
index d66cb00f..48347a48 100644
|
||||
--- a/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]
|
||||
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 { };
|
||||
|
||||
deltachat-desktop = callPackage ../applications/networking/instant-messengers/deltachat-desktop {
|
||||
electron = electron_30;
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||
};
|
||||
|
||||
|
@ -2957,6 +2957,8 @@ self: super: with self; {
|
||||
|
||||
deltachat = callPackage ../development/python-modules/deltachat { };
|
||||
|
||||
deltachat2 = callPackage ../development/python-modules/deltachat2 { };
|
||||
|
||||
deluge-client = callPackage ../development/python-modules/deluge-client { };
|
||||
|
||||
demes = callPackage ../development/python-modules/demes { };
|
||||
|
Loading…
Reference in New Issue
Block a user