2021-10-24 16:25:19 +00:00
|
|
|
{ src
|
|
|
|
, version
|
|
|
|
, jami-meta
|
|
|
|
, stdenv
|
|
|
|
, lib
|
2021-11-20 17:08:03 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-24 16:25:19 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, perl # for pod2man
|
2022-02-05 21:31:49 +00:00
|
|
|
, ffmpeg_4
|
2021-10-24 16:25:19 +00:00
|
|
|
, pjsip
|
|
|
|
, alsa-lib
|
|
|
|
, asio
|
|
|
|
, dbus
|
|
|
|
, dbus_cplusplus
|
|
|
|
, fmt
|
|
|
|
, gmp
|
|
|
|
, libarchive
|
|
|
|
, libgit2
|
|
|
|
, libnatpmp
|
|
|
|
, secp256k1
|
|
|
|
, openssl
|
|
|
|
, opendht
|
|
|
|
, speex
|
|
|
|
, webrtc-audio-processing
|
|
|
|
, jsoncpp
|
|
|
|
, gnutls
|
|
|
|
, zlib
|
|
|
|
, libyamlcpp
|
|
|
|
, libpulseaudio
|
|
|
|
, jack
|
|
|
|
, udev
|
|
|
|
, libupnp
|
|
|
|
, msgpack
|
|
|
|
, restinio
|
|
|
|
, http-parser
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file));
|
|
|
|
|
2022-02-05 21:31:49 +00:00
|
|
|
ffmpeg-jami = ffmpeg_4.overrideAttrs (old:
|
2021-10-24 16:25:19 +00:00
|
|
|
let
|
|
|
|
patch-src = src + "/daemon/contrib/src/ffmpeg/";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches));
|
|
|
|
configureFlags = old.configureFlags
|
|
|
|
++ (readLinesToList ./config/ffmpeg_args_common)
|
|
|
|
++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux)
|
|
|
|
++ lib.optionals (stdenv.isx86_32 || stdenv.isx86_64) (readLinesToList ./config/ffmpeg_args_x86);
|
|
|
|
outputs = [ "out" "doc" ];
|
2021-11-05 15:34:35 +00:00
|
|
|
meta = old.meta // {
|
|
|
|
# undefined reference to `ff_nlmeans_init_aarch64'
|
|
|
|
broken = stdenv.isAarch64;
|
|
|
|
};
|
2021-10-24 16:25:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
pjsip-jami = pjsip.overrideAttrs (old:
|
|
|
|
let
|
2021-11-20 17:08:03 +00:00
|
|
|
src-args = import ./pjproject-src.nix;
|
|
|
|
version = lib.concatStrings (lib.lists.take 7 (lib.stringToCharacters src-args.rev));
|
2021-10-24 16:25:19 +00:00
|
|
|
patch-src = src + "/daemon/contrib/src/pjproject/";
|
|
|
|
in
|
|
|
|
{
|
2021-11-20 17:08:03 +00:00
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub src-args;
|
|
|
|
|
2021-10-24 16:25:19 +00:00
|
|
|
patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches));
|
|
|
|
});
|
|
|
|
|
|
|
|
opendht-jami = opendht.override {
|
|
|
|
enableProxyServerAndClient = true;
|
|
|
|
enablePushNotifications = true;
|
|
|
|
};
|
|
|
|
|
2021-11-20 17:08:03 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2021-10-24 16:25:19 +00:00
|
|
|
pname = "jami-daemon";
|
|
|
|
inherit src version;
|
|
|
|
sourceRoot = "source/daemon";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
perl
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
asio
|
|
|
|
dbus
|
|
|
|
dbus_cplusplus
|
|
|
|
fmt
|
|
|
|
ffmpeg-jami
|
|
|
|
gmp
|
|
|
|
gnutls
|
|
|
|
libarchive
|
|
|
|
libgit2
|
|
|
|
libnatpmp
|
|
|
|
opendht-jami
|
|
|
|
pjsip-jami
|
|
|
|
secp256k1
|
|
|
|
openssl
|
|
|
|
speex
|
|
|
|
webrtc-audio-processing
|
|
|
|
zlib
|
|
|
|
libyamlcpp
|
|
|
|
jsoncpp
|
|
|
|
libpulseaudio
|
|
|
|
jack
|
|
|
|
opendht
|
|
|
|
libupnp
|
|
|
|
udev
|
|
|
|
msgpack
|
|
|
|
restinio
|
|
|
|
http-parser
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false; # The tests fail to compile due to missing headers.
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
ffmpeg = ffmpeg-jami;
|
|
|
|
pjsip = pjsip-jami;
|
|
|
|
opendht = opendht-jami;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = jami-meta // {
|
|
|
|
description = "The daemon" + jami-meta.description;
|
|
|
|
};
|
|
|
|
}
|