git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #145294 from dotlambda/libdeltachat-1.63.0
commit17d6959932d8c2bd162ececd55fed92dd9632f6e authorSandro <sandro.jaeckel@gmail.com> dateThu 11 Nov 2021, 13:38 (5 years ago) parentfa7abc6556a981
4 files changed+64−21
pkgs/applications/networking/instant-messengers/kdeltachat/default.nix+3−3 pkgs/development/libraries/libdeltachat/darwin-dylib.patch+53 pkgs/development/libraries/libdeltachat/default.nix+4−13 pkgs/development/libraries/libdeltachat/no-static-lib.patch+4−5
pkgs/applications/networking/instant-messengers/kdeltachat/default.nix+3−3
@@ -14,13 +14,13 @@
1414
1515mkDerivation rec {
1616 pname = "kdeltachat";
17− version = "unstable-2021-09-10";
17+ version = "unstable-2021-10-27";
1818
1919 src = fetchFromSourcehut {
2020 owner = "~link2xt";
2121 repo = "kdeltachat";
22− rev = "40092aa096bac7e279eb5a4cc97758bac484236c";
23− sha256 = "0vmsbxx4hxh35v1lbj82vq2w8z8inj83xpf24wzlbdr9inlbmym4";
22+ rev = "e1201cdcce4311061643d90cc0132745023a82d2";
23+ sha256 = "04xqvyj4rzgl9r7sfjjw1kc3vql30c80rwppff2zr5aijr15fgjj";
2424 };
2525
2626 nativeBuildInputs = [
pkgs/development/libraries/libdeltachat/darwin-dylib.patchnew file+53
@@ -0,0 +1,53 @@
1+diff --git a/CMakeLists.txt b/CMakeLists.txt
2+index 5ed8020c..44ca43e7 100644
3+--- a/CMakeLists.txt
4++++ b/CMakeLists.txt
5+@@ -2,12 +2,20 @@ cmake_minimum_required(VERSION 3.16)
6+ project(deltachat LANGUAGES C)
7+ include(GNUInstallDirs)
8+
9++if(APPLE)
10++ set(DYNAMIC_EXT "dylib")
11++elseif(UNIX)
12++ set(DYNAMIC_EXT "so")
13++else()
14++ set(DYNAMIC_EXT "dll")
15++endif()
16++
17+ find_program(CARGO cargo)
18+
19+ add_custom_command(
20+ OUTPUT
21+ "target/release/libdeltachat.a"
22+- "target/release/libdeltachat.so"
23++ "target/release/libdeltachat.${DYNAMIC_EXT}"
24+ "target/release/pkgconfig/deltachat.pc"
25+ COMMAND
26+ PREFIX=${CMAKE_INSTALL_PREFIX}
27+@@ -32,11 +40,11 @@ add_custom_target(
28+ ALL
29+ DEPENDS
30+ "target/release/libdeltachat.a"
31+- "target/release/libdeltachat.so"
32++ "target/release/libdeltachat.${DYNAMIC_EXT}"
33+ "target/release/pkgconfig/deltachat.pc"
34+ )
35+
36+ install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
37+ install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
38+-install(FILES "target/release/libdeltachat.so" DESTINATION ${CMAKE_INSTALL_LIBDIR})
39++install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
40+ install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
41+diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py
42+index c8ed43e2..714c7e30 100755
43+--- a/python/install_python_bindings.py
44++++ b/python/install_python_bindings.py
45+@@ -24,7 +24,7 @@
46+
47+ print("running:", " ".join(cmd))
48+ subprocess.check_call(cmd)
49+- subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)
50++ subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib" , shell=True)
51+
52+ if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
53+ subprocess.check_call([
pkgs/development/libraries/libdeltachat/default.nix+4−13
@@ -1,7 +1,6 @@
11{ lib
22, stdenv
33, fetchFromGitHub
4−, fetchpatch
54, cmake
65, openssl
76, perl
@@ -16,33 +15,25 @@
1615
1716stdenv.mkDerivation rec {
1817 pname = "libdeltachat";
19− version = "1.60.0";
18+ version = "1.63.0";
2019
2120 src = fetchFromGitHub {
2221 owner = "deltachat";
2322 repo = "deltachat-core-rust";
2423 rev = version;
25− sha256 = "1agm5xyaib4ynmw4mhgmkhh4lnxs91wv0q9i1zfihv2vkckfm2s2";
24+ sha256 = "1511jh38h7nmn4dpyi1vfxvhybcacc6gavwfifxvb5npirphziga";
2625 };
2726
2827 patches = [
2928 # https://github.com/deltachat/deltachat-core-rust/pull/2589
30− (fetchpatch {
31− url = "https://github.com/deltachat/deltachat-core-rust/commit/408467e85d04fbbfd6bed5908d84d9e995943487.patch";
32− sha256 = "1j2ywaazglgl6370js34acrg0wrh0b7krqg05dfjf65n527lzn59";
33− })
29+ ./darwin-dylib.patch
3430 ./no-static-lib.patch
35− # https://github.com/deltachat/deltachat-core-rust/pull/2660
36− (fetchpatch {
37− url = "https://github.com/deltachat/deltachat-core-rust/commit/8fb5e038a97d8ae68564c885d61b93127a68366d.patch";
38− sha256 = "088pzfrrkgfi4646dc72404s3kykcpni7hgkppalwlzg0p4is41x";
39− })
4031 ];
4132
4233 cargoDeps = rustPlatform.fetchCargoTarball {
4334 inherit src;
4435 name = "${pname}-${version}";
45− sha256 = "09d3mw2hb1gmqg7smaqwnfm7izw40znl0h1dz7s2imms2cnkjws1";
36+ sha256 = "0hfp2k84mvq11h7q96hkcj3k6f3sxw8wx89acg4hy6lbh8xpy6ai";
4637 };
4738
4839 nativeBuildInputs = [
pkgs/development/libraries/libdeltachat/no-static-lib.patch+4−5
@@ -1,8 +1,8 @@
11diff --git a/CMakeLists.txt b/CMakeLists.txt
2−index fe7abe08..acdbe0d6 100644
2+index 44ca43e7..8b6960dd 100644
33--- a/CMakeLists.txt
44+++ b/CMakeLists.txt
5−@@ -13,7 +13,6 @@ find_program(CARGO cargo)
5+@@ -14,7 +14,6 @@ find_program(CARGO cargo)
66
77 add_custom_command(
88 OUTPUT
@@ -10,7 +10,7 @@ index fe7abe08..acdbe0d6 100644
1010 "target/release/libdeltachat.${DYNAMIC_EXT}"
1111 "target/release/pkgconfig/deltachat.pc"
1212 COMMAND
13−@@ -38,13 +37,11 @@ add_custom_target(
13+@@ -39,12 +38,10 @@ add_custom_target(
1414 lib_deltachat
1515 ALL
1616 DEPENDS
@@ -19,13 +19,12 @@ index fe7abe08..acdbe0d6 100644
1919 "target/release/pkgconfig/deltachat.pc"
2020 )
2121
22− include(GNUInstallDirs)
2322 install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
2423-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
2524 install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
2625 install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
2726diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
28−index a34a27ba..cf354abb 100644
27+index de0fbafe..120efec9 100644
2928--- a/deltachat-ffi/Cargo.toml
3029+++ b/deltachat-ffi/Cargo.toml
3130@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]