diff --git a/meson.build b/meson.build
index c9f688b6fca03ffe4d6a99f5abc5d2e41753b2f4..7f349e276b18e5764da93fea6435a9942d641248 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,7 @@ modcmake = import('cmake')
 depthreads = dependency('threads')
 depopendht = dependency('opendht', version: '>= 2.1.0')
 depgnutls = dependency('gnutls', version: '>= 3.6.7')
+depnettle = dependency('nettle', version: '>= 3.0.0')
 deplibpjproject = dependency('libpjproject')
 deplibgit2 = dependency('libgit2', version: '>= 1.1.0')
 deplibsecp256k1 = dependency('libsecp256k1', version: '>= 0.1')
@@ -129,17 +130,21 @@ endif
 
 if get_option('plugins')
     conf.set('ENABLE_PLUGIN', true)
-    deplibarchive = dependency('libarchive', version: '>= 3.4.0', required: false)
-    if not deplibarchive.found()
-        deplibarchive = modcmake.subproject('libarchive', cmake_options: [
-            '-DCMAKE_BUILD_TYPE=Release',
-            '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
-            '-DENABLE_TEST=OFF',
-            '-DENABLE_TAR=OFF',
-            '-DENABLE_CPIO=OFF',
-            '-DENABLE_CAT=OFF',
-            '-DENABLE_LIBXML2=OFF'
-        ]).dependency('archive_static')
+    if host_machine.system() == 'darwin'
+        depminizip = dependency('minizip', version: '>= 3.0.0')
+    else
+        deplibarchive = dependency('libarchive', version: '>= 3.4.0', required: false)
+        if not deplibarchive.found()
+            deplibarchive = modcmake.subproject('libarchive', cmake_options: [
+                '-DCMAKE_BUILD_TYPE=Release',
+                '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
+                '-DENABLE_TEST=OFF',
+                '-DENABLE_TAR=OFF',
+                '-DENABLE_CPIO=OFF',
+                '-DENABLE_CAT=OFF',
+                '-DENABLE_LIBXML2=OFF'
+            ]).dependency('archive_static')
+        endif
     endif
     depdl = meson.get_compiler('cpp').find_library('dl', required: false)
 else
diff --git a/src/meson.build b/src/meson.build
index 1fd89a7a50d39af06d96f28863fd292a50f06828..991ea85776e499a257c374636bc970f46f615e38 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -39,6 +39,7 @@ libjami_sources = files(
     'jamidht/server_account_manager.cpp',
     'jamidht/sync_channel_handler.cpp',
     'jamidht/sync_module.cpp',
+    'jamidht/transfer_channel_handler.cpp',
     'media/audio/echo-cancel/null_echo_canceller.cpp',
     'media/audio/sound/audiofile.cpp',
     'media/audio/sound/dtmf.cpp',
@@ -130,6 +131,7 @@ libjami_dependencies = [
     depthreads,
     depopendht,
     depgnutls,
+    depnettle,
     deplibpjproject,
     deplibgit2,
     deplibsecp256k1,
@@ -298,7 +300,12 @@ if conf.get('ENABLE_PLUGIN')
         'plugin/pluginpreferencesutils.cpp',
         'plugin/pluginsutils.cpp'
     )
-    libjami_dependencies += [deplibarchive, depdl]
+    if host_machine.system() == 'darwin'
+        libjami_dependencies += depminizip
+    else
+        libjami_dependencies += deplibarchive
+    endif
+    libjami_dependencies += depdl
 endif
 
 libjami = library('jami',