tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
libdeltachat: 1.60.0 -> 1.63.0
Robert Schütz
4 years ago
c571aa76
424d276c
+61
-18
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libdeltachat
darwin-dylib.patch
default.nix
no-static-lib.patch
+53
pkgs/development/libraries/libdeltachat/darwin-dylib.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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([
+4
-13
pkgs/development/libraries/libdeltachat/default.nix
···
1
{ lib
2
, stdenv
3
, fetchFromGitHub
4
-
, fetchpatch
5
, cmake
6
, openssl
7
, perl
···
16
17
stdenv.mkDerivation rec {
18
pname = "libdeltachat";
19
-
version = "1.60.0";
20
21
src = fetchFromGitHub {
22
owner = "deltachat";
23
repo = "deltachat-core-rust";
24
rev = version;
25
-
sha256 = "1agm5xyaib4ynmw4mhgmkhh4lnxs91wv0q9i1zfihv2vkckfm2s2";
26
};
27
28
patches = [
29
# 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
-
})
34
./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
-
})
40
];
41
42
cargoDeps = rustPlatform.fetchCargoTarball {
43
inherit src;
44
name = "${pname}-${version}";
45
-
sha256 = "09d3mw2hb1gmqg7smaqwnfm7izw40znl0h1dz7s2imms2cnkjws1";
46
};
47
48
nativeBuildInputs = [
···
1
{ lib
2
, stdenv
3
, fetchFromGitHub
0
4
, cmake
5
, openssl
6
, perl
···
15
16
stdenv.mkDerivation rec {
17
pname = "libdeltachat";
18
+
version = "1.63.0";
19
20
src = fetchFromGitHub {
21
owner = "deltachat";
22
repo = "deltachat-core-rust";
23
rev = version;
24
+
sha256 = "1511jh38h7nmn4dpyi1vfxvhybcacc6gavwfifxvb5npirphziga";
25
};
26
27
patches = [
28
# https://github.com/deltachat/deltachat-core-rust/pull/2589
29
+
./darwin-dylib.patch
0
0
0
30
./no-static-lib.patch
0
0
0
0
0
31
];
32
33
cargoDeps = rustPlatform.fetchCargoTarball {
34
inherit src;
35
name = "${pname}-${version}";
36
+
sha256 = "0hfp2k84mvq11h7q96hkcj3k6f3sxw8wx89acg4hy6lbh8xpy6ai";
37
};
38
39
nativeBuildInputs = [
+4
-5
pkgs/development/libraries/libdeltachat/no-static-lib.patch
···
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
-
index fe7abe08..acdbe0d6 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
-
@@ -13,7 +13,6 @@ find_program(CARGO cargo)
6
7
add_custom_command(
8
OUTPUT
···
10
"target/release/libdeltachat.${DYNAMIC_EXT}"
11
"target/release/pkgconfig/deltachat.pc"
12
COMMAND
13
-
@@ -38,13 +37,11 @@ add_custom_target(
14
lib_deltachat
15
ALL
16
DEPENDS
···
19
"target/release/pkgconfig/deltachat.pc"
20
)
21
22
-
include(GNUInstallDirs)
23
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
24
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
25
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
26
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
27
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
28
-
index a34a27ba..cf354abb 100644
29
--- a/deltachat-ffi/Cargo.toml
30
+++ b/deltachat-ffi/Cargo.toml
31
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]
···
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+
index 44ca43e7..8b6960dd 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
+
@@ -14,7 +14,6 @@ find_program(CARGO cargo)
6
7
add_custom_command(
8
OUTPUT
···
10
"target/release/libdeltachat.${DYNAMIC_EXT}"
11
"target/release/pkgconfig/deltachat.pc"
12
COMMAND
13
+
@@ -39,12 +38,10 @@ add_custom_target(
14
lib_deltachat
15
ALL
16
DEPENDS
···
19
"target/release/pkgconfig/deltachat.pc"
20
)
21
0
22
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
23
-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
24
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
25
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
26
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
27
+
index de0fbafe..120efec9 100644
28
--- a/deltachat-ffi/Cargo.toml
29
+++ b/deltachat-ffi/Cargo.toml
30
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]