linphonePackages: init

Co-authored-by: Jaakko Luttinen <jaakko.luttinen@iki.fi>
Co-authored-by: Thibault Lemaire <thibault.lemaire@protonmail.com>
Co-authored-by: 7c6f434c <7c6f434c@mail.ru>
This commit is contained in:
Naxdy
2025-10-08 14:44:05 +02:00
co-authored by Jaakko Luttinen Thibault Lemaire 7c6f434c
parent bbc8d94867
commit df70542755
28 changed files with 1148 additions and 13 deletions
@@ -0,0 +1,41 @@
# Linphone
Linphone is a SIP softphone application developed by Belledonne Communications.
The main application is located in the [`linphone-desktop`](https://gitlab.linphone.org/BC/public/linphone-desktop) repository, and depends on many bespoke libraries, as well as third-party libraries with custom patches.
This scope provides all libraries and patches needed for Linphone to build.
BC-developed libraries are housed within the [`linphone-sdk`](https://gitlab.linphone.org/BC/public/linphone-sdk) monorepo.
Current stable versions of the monorepo utilize git submodules to link the respective package repos, but BC has since integrated all of their libraries into the monorepo proper, which is why we're already using a single source for the entire repo.
An auxiliary function `mkLinphoneDerivation` is provided in this scope, to streamline building libraries from that repository.
Other third-party libraries for which BC has provided custom patches, and are not included in the monorepo, are prefixed with `bc-`.
All libraries and packages are exposed in nixpkgs under the `linphonePackage` scope via `pkgs/all-packages.nix`.
## Updating
Updating is done in 3 steps:
1. Update the main Linphone application in the derivation directly
2. Update all libraries derived from the `linphone-sdk` monorepo, by updating the monorepo version and hash in `./default.nix`
3. Update all custom versions of third-party libraries individually (those prefixed with `bc-`)
4. Verify that the build is working by building (and running) `linphonePackages.linphone-desktop`.
> [!TIP]
>
> When testing, run the app with `./result/bin/linphone --verbose` to get useful logs in `stdout`.
## Adding new libraries
To add a new package to this scope, simply add a new subdirectory containing a `default.nix` file with the appropriate package name. The scope automatically picks up any directories and adds an according toplevel package.
If the package you are adding is contained within the `linphone-sdk` monorepo, it makes sense to use the `mkLinphoneDerivation` function to streamline the build process.
If the package you are adding is a third-party libary with custom patches from BC, it should be prefixed with `bc-` for easy recognizability, so e.g. if BC were to patch `ffmpeg`, you would call the package `bc-ffmpeg`.
## Notes for the future
As mentioned before, currently most libraries within `linphone-sdk` are simply git submodules, but in the future, they will be properly integrated into the monorepo (this is already the case for their main branch).
Also, currently the build relies on Qt5, but starting with Linphone 6.0.0, which as of 2025-09-20 is in its RC phase, the build will involve Qt6.
@@ -0,0 +1,44 @@
{
cmake,
fetchFromGitLab,
lib,
python3,
stdenv,
}:
stdenv.mkDerivation {
pname = "bc-decaf";
# version retrieved from `HISTORY.txt`
version = "1.0.2-unstable-2025-06-25";
nativeBuildInputs = [ cmake ];
buildInputs = [
python3
];
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
group = "BC";
owner = "public/external";
repo = "decaf";
rev = "e5cc6240690d3ffdfcbdb1e4e851954b789cd5d9";
sha256 = "sha256-4oZtpdelyKbd2k4LAhtsLkL5Y84C1Qb02fpVywYorr8=";
};
# Do not build static libraries and do not enable -Werror
cmakeFlags = [
"-DENABLE_STATIC=NO"
"-DBUILD_SHARED_LIBS=ON"
"-DENABLE_STRICT=NO"
];
meta = {
description = "Elliptic curve library supporting Ed448-Goldilocks and Curve25519. Belledonne Communications' fork for Linphone";
homepage = "https://gitlab.linphone.org/BC/public/external/decaf";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
naxdy
thibaultlemaire
];
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,59 @@
{
cmake,
fetchFromGitLab,
lib,
stdenv,
# tests
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bc-ispell";
# version retrieved from `CHANGES`
version = "3.4.02-unstable-2025-05-05";
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
group = "BC";
owner = "public/external";
repo = "ispell";
rev = "05574fe160222c3d0b6283c1433c9b087271fad1";
sha256 = "sha256-YoRLiMjk2BxoI27xc2nzucxfHV9UbouFRSECb3RdHGo=";
};
patches = [
# linphone has custom find modules that look for this package,
# but they do not work in nix, so we need to patch this library to
# install regular cmake config files
./install-config-files.patch
];
cmakeFlags = [
"-DENABLE_STATIC=NO"
"-DBUILD_SHARED_LIBS=ON"
];
nativeBuildInputs = [ cmake ];
passthru.tests = {
cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [
"ISpell"
];
};
};
meta = {
description = "Interactive spelling checker";
homepage = "https://gitlab.linphone.org/BC/public/external/ispell";
platforms = lib.platforms.all;
# NOTE: ISpell itself does not explicitly provide a license. From its
# 'Contributors' file, it can be deduced that it is distributed under
# "some" open source license, but the details are not clear.
license = lib.licenses.free;
maintainers = with lib.maintainers; [
naxdy
];
};
})
@@ -0,0 +1,90 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6edcc88..6f5601d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,11 +47,62 @@ set(ISPELL_SOURCES
xgets.c
)
+set(ISPELL_HEADERS
+ config.h
+ defhash.h
+ exp_table.h
+ fields.h
+ ispell.h
+ libispell.h
+ local.h
+ msgs.h
+ proto.h
+ version.h
+)
+
add_library(${ISPELL_TARGET_NAME} SHARED ${ISPELL_SOURCES})
+install(
+ FILES
+ ${ISPELL_HEADERS}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+)
+
+install(TARGETS ${ISPELL_TARGET_NAME}
+ EXPORT ${ISPELL_TARGET_NAME}Targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
install(TARGETS ${ISPELL_TARGET_NAME}
EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+
+install(
+ EXPORT ${ISPELL_TARGET_NAME}Targets
+ FILE ${ISPELL_TARGET_NAME}Targets.cmake
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${ISPELL_TARGET_NAME}/cmake"
+ NAMESPACE ${ISPELL_TARGET_NAME}::
+)
+
+install(
+ EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
+ FILE ${ISPELL_TARGET_NAME}LibraryDepends.cmake
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${ISPELL_TARGET_NAME}/cmake"
+ NAMESPACE ${ISPELL_TARGET_NAME}::
+)
+
+configure_package_config_file(
+ ${ISPELL_TARGET_NAME}Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+ INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/${ISPELL_TARGET_NAME}/cmake"
+)
+
+install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${ISPELL_TARGET_NAME}/cmake"
+)
diff --git a/ISpellConfig.cmake.in b/ISpellConfig.cmake.in
index 052194b..cb71737 100644
--- a/ISpellConfig.cmake.in
+++ b/ISpellConfig.cmake.in
@@ -6,13 +6,13 @@
@PACKAGE_INIT@
-include("${CMAKE_CURRENT_LIST_DIR}/@ISPELL_TARGET_NAME@LibraryDepends.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/ISpellLibraryDepends.cmake")
-set(ISPELL_LIBRARIES "@ISPELL_TARGET_NAME@")
-get_target_property(ISPELL_INCLUDE_DIRS "@ISPELL_TARGET_NAME@" INTERFACE_INCLUDE_DIRECTORIES)
+set(ISPELL_LIBRARIES "ISpell")
+get_target_property(ISPELL_INCLUDE_DIRS "ISpell::ISpell" INTERFACE_INCLUDE_DIRECTORIES)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18.0)
- add_library(@ISpell_TARGET_NAME@::@ISpell_TARGET_NAME@ ALIAS @ISpell_TARGET_NAME@)
+ add_library(ISpell ALIAS ISpell::ISpell)
endif()
-check_required_components(@ISpell_TARGET_NAME@)
+check_required_components(ISpell)
@@ -0,0 +1,58 @@
{
cmake,
fetchFromGitLab,
fetchpatch,
sqlite,
boost,
lib,
stdenv,
}:
stdenv.mkDerivation {
pname = "bc-soci";
# version retrieved from `CHANGELOG.md`
version = "3.2.3-unstable-2025-05-05";
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
group = "BC";
owner = "public/external";
repo = "soci";
rev = "3a9c79088212941d0175c22cd2da8fe1bdd639df";
sha256 = "sha256-7aSTFD4yk1i6c9cEGqdo/eJtuqoOUZUTJlZijgjuYpM=";
};
patches = [
(fetchpatch {
name = "fix-backend-search-path.patch";
url = "https://github.com/SOCI/soci/commit/56c93afc467bdba8ffbe68739eea76059ea62f7a.patch";
sha256 = "sha256-nC/39pn3Cv5e65GgIfF3l64/AbCsfZHPUPIWETZFZAY=";
})
];
cmakeFlags = [
# Do not build static libraries
"-DSOCI_SHARED=YES"
"-DSOCI_STATIC=OFF"
"-DSOCI_TESTS=NO"
"-DWITH_SQLITE3=YES"
];
nativeBuildInputs = [ cmake ];
buildInputs = [
sqlite
boost
];
meta = {
description = "Database access library for C++. Belledonne Communications' fork for Linphone";
homepage = "https://gitlab.linphone.org/BC/public/external/soci";
license = lib.licenses.boost;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
thibaultlemaire
naxdy
];
};
}
@@ -0,0 +1,50 @@
{
bcunit,
bc-decaf,
mkLinphoneDerivation,
openssl,
lib,
# tests
testers,
}:
mkLinphoneDerivation (finalAttrs: {
pname = "bctoolbox";
propagatedBuildInputs = [
bcunit
bc-decaf
openssl
];
cmakeFlags = [
"-DENABLE_STRICT=NO"
# mbedtils does not build
"-DENABLE_MBEDTLS=NO"
"-DENABLE_OPENSSL=YES"
];
strictDeps = true;
passthru.tests = {
cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [
"BCToolbox"
];
};
};
meta = {
description = "Utilities library for Linphone";
mainProgram = "bctoolbox_tester";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
jluttine
naxdy
raskin
];
};
})
@@ -0,0 +1,17 @@
{
mkLinphoneDerivation,
lib,
}:
mkLinphoneDerivation {
pname = "bcunit";
meta = {
description = "Fork of the defunct project CUnit, a unit testing framework";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
jluttine
naxdy
raskin
];
};
}
@@ -0,0 +1,35 @@
{
bctoolbox,
belr,
lib,
mkLinphoneDerivation,
# tests
testers,
}:
mkLinphoneDerivation (finalAttrs: {
pname = "belcard";
propagatedBuildInputs = [
bctoolbox
belr
];
cmakeFlags = [
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
];
passthru.tests = {
cmake-config = testers.hasCmakeConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [
"BelCard"
];
};
};
meta = {
description = "C++ library to manipulate VCard standard format. Part of the Linphone project";
license = lib.licenses.gpl3Only;
};
})
@@ -0,0 +1,43 @@
{
bctoolbox,
belr,
lib,
libantlr3c,
stdenv,
zlib,
python3,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "belle-sip";
nativeBuildInputs = [
python3
];
env.NIX_CFLAGS_COMPILE = toString (
[
"-Wno-error=cast-function-type"
"-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation"
"-Wno-error=stringop-overflow"
]
++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but problematic with some old GCCs and probably clang
"-Wno-error=use-after-free"
]
);
propagatedBuildInputs = [
libantlr3c
bctoolbox
belr
zlib
];
meta = {
description = "Modern library implementing SIP (RFC 3261) transport, transaction and dialog layers. Part of the Linphone project";
mainProgram = "belle_sip_tester";
license = lib.licenses.gpl3Only;
};
}
@@ -0,0 +1,17 @@
{
bctoolbox,
lib,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "belr";
buildInputs = [
bctoolbox
];
meta = {
description = "Belledonne Communications' language recognition library (a SIP parsing library). Part of the Linphone project";
license = lib.licenses.gpl3Only;
};
}
@@ -0,0 +1,24 @@
{
bctoolbox,
sqlite,
lib,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "bzrtp";
buildInputs = [
bctoolbox
sqlite
];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];
meta = {
description = "Opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project";
license = lib.licenses.gpl3Only;
};
}
@@ -0,0 +1,20 @@
{
generateSplicesForMkScope,
makeScopeWithSplicing',
lib,
}:
makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "linphonePackages";
extra = self: {
mkLinphoneDerivation = self.mk-linphone-derivation;
linphoneSdkVersion = "5.4.43";
linphoneSdkHash = "sha256-lv2phU2qF51OIejzjgaBUo9NIdDv4bbK+bpY37Gnr8U=";
};
f =
self:
let
packages = lib.filterAttrs (name: value: value == "directory") (builtins.readDir ./.);
in
lib.mapAttrs (name: value: self.callPackage ./${name} { }) packages;
}
@@ -0,0 +1,83 @@
{
lib,
bc-soci,
belcard,
belle-sip,
doxygen,
jsoncpp,
libxml2,
lime,
mediastreamer2,
python3,
sqlite,
xercesc,
zxing-cpp,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "liblinphone";
cmakeFlags = [
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
"-DENABLE_STRICT=NO" # Do not build with -Werror
# normally set by a cmake module, but
# we need to disable it to prevent downstream link errors
"-DJsonCPP_TARGET=jsoncpp"
];
buildInputs = [
# Made by BC
belcard
belle-sip
lime
mediastreamer2
# Vendored by BC
bc-soci
libxml2
sqlite
xercesc
zxing-cpp
];
propagatedBuildInputs = [
jsoncpp
];
nativeBuildInputs = [
doxygen
(python3.withPackages (ps: [
ps.pystache
ps.six
ps.pyturbojpeg
]))
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail JsonCPP jsoncpp
'';
preConfigure = ''
rm cmake/FindJsonCPP.cmake
'';
strictDeps = true;
# Some grammar files needed to be copied too from some dependencies. I suppose
# if one define a dependency in such a way that its share directory is found,
# then this copying would be unnecessary. Instead of actually copying these
# files, create a symlink.
postInstall = ''
mkdir -p $out/share/belr/grammars
ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
'';
meta = {
description = "Library for SIP calls and instant messaging";
license = lib.licenses.agpl3Plus;
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,31 @@
{
bctoolbox,
belle-sip,
lib,
bc-soci,
sqlite,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "lime";
buildInputs = [
# Made by BC
bctoolbox
belle-sip
# Vendored by BC
bc-soci
sqlite
];
cmakeFlags = [
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
];
meta = {
description = "End-to-end encryption library for instant messaging. Part of the Linphone project";
license = lib.licenses.gpl3Only;
};
}
@@ -0,0 +1,167 @@
{
bc-ispell,
bc-soci,
bctoolbox,
belcard,
belle-sip,
belr,
boost,
cmake,
doxygen,
fetchFromGitLab,
lib,
liblinphone,
libsForQt5,
lime,
mediastreamer2,
minizip-ng,
msopenh264,
python3,
python3Packages,
stdenv,
symlinkJoin,
xercesc,
zxing-cpp,
}:
let
grammars = symlinkJoin {
name = "belr-grammars";
paths =
let
grammarPackages = [
belle-sip
belcard
liblinphone
];
in
map (e: "${e}/share/belr/grammars") grammarPackages;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "linphone-desktop";
version = "5.3.0";
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
owner = "public";
group = "BC";
repo = "linphone-desktop";
rev = finalAttrs.version;
hash = "sha256-SxYI2ZOtA49K2XPoTRPAIziAwC8SRrHMC3NISBFyuH0=";
};
patches = [
./require-finding-packages.patch
./remove-bc-versions.patch
./do-not-override-install-prefix.patch
./fix-translation-dirs.patch
./unset-qml-dir.patch
# .mkv recordings are broken in NixOS and other distros (see
# https://github.com/NixOS/nixpkgs/issues/219551), and simply changing the
# file extension is enough to affect the chosen codec (wav makes more
# sense for audio recordings anyway)
./record-in-wav-format.patch
];
buildInputs = [
# Made by BC
bctoolbox
belcard
belle-sip
belr
liblinphone
mediastreamer2
msopenh264
lime
bc-soci
bc-ispell
xercesc
minizip-ng
libsForQt5.qtgraphicaleffects
libsForQt5.qtmultimedia
libsForQt5.qtquickcontrols2
zxing-cpp
boost
python3Packages.pystache
python3Packages.six
];
nativeBuildInputs = [
cmake
libsForQt5.qttools
libsForQt5.wrapQtAppsHook
python3
doxygen
];
cmakeFlags = [
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
"-DBUILD_SHARED_LIBS=ON"
"-DMINIZIP_INCLUDE_DIRS=${minizip-ng}/include"
"-DMINIZIP_LIBRARIES=minizip"
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
# Requires EQt5Keychain
"-DENABLE_QT_KEYCHAIN=OFF"
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DLINPHONEAPP_VERSION=${finalAttrs.version}"
"-DLINPHONE_QT_ONLY=ON"
"-DLINPHONEAPP_INSTALL_PREFIX=${placeholder "out"}"
"-DLINPHONE_QML_DIR=${placeholder "out"}/${libsForQt5.qtbase.qtQmlPrefix}/ui"
# normally set by the custom find modules, which we have disabled
"-DLibLinphone_TARGET=liblinphone"
"-DLinphoneCxx_TARGET=liblinphone++"
"-DISpell_SOURCE_DIR=${bc-ispell.src}"
];
preConfigure = ''
# custom "find" modules are causing issues during build,
# as they are blinding cmake to nix dependencies
rm -rf linphone-app/cmake
'';
preInstall = ''
mkdir -p $out/share/linphone
mkdir -p $out/share/sounds/linphone
mkdir -p $out/share/belr
'';
# In order to find mediastreamer plugins, mediastreamer package was patched to
# support an environment variable pointing to the plugin directory. Set that
# environment variable by wrapping the Linphone executable.
#
# It is quite likely that there are some other files still missing and
# Linphone will randomly crash when it tries to access those files. Then,
# those just need to be linked manually below.
postInstall = ''
mkdir -p $out/lib/mediastreamer/plugins
ln -s ${msopenh264}/lib/mediastreamer/plugins/* $out/lib/mediastreamer/plugins/
ln -s ${mediastreamer2}/lib/mediastreamer/plugins/* $out/lib/mediastreamer/plugins/
ln -s ${grammars} $out/share/belr/grammars
wrapProgram $out/bin/linphone \
--unset QML2_IMPORT_PATH \
--set MEDIASTREAMER_PLUGINS_DIR $out/lib/mediastreamer/plugins
'';
meta = {
homepage = "https://www.linphone.org/";
description = "Open source SIP phone for voice/video calls and instant messaging";
mainProgram = "linphone";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
jluttine
naxdy
];
};
})
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 312df041d..43500be48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,11 +116,6 @@ endif ()
#------------------------------------------------------------------------------
# Prepare gobal CMAKE configuration specific to the current project
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/OUTPUT" CACHE PATH "Default linphone-app installation prefix" FORCE)
- set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)
-endif()
-
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified")
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)
@@ -0,0 +1,15 @@
diff --git a/linphone-app/assets/languages/CMakeLists.txt b/linphone-app/assets/languages/CMakeLists.txt
index ffe2b6a5b..12f02bdfe 100644
--- a/linphone-app/assets/languages/CMakeLists.txt
+++ b/linphone-app/assets/languages/CMakeLists.txt
@@ -32,8 +32,8 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${I18N_FILENAME}" "${I18N_CONTENT}")
#Files or directories to inspect for translations references
set(TRANSLATION_SOURCES)
-list(APPEND TRANSLATION_SOURCES "${PROJECT_SOURCE_DIR}/src")
-list(APPEND TRANSLATION_SOURCES "${PROJECT_SOURCE_DIR}/ui")
+list(APPEND TRANSLATION_SOURCES "${PROJECT_SOURCE_DIR}/linphone-app/src")
+list(APPEND TRANSLATION_SOURCES "${PROJECT_SOURCE_DIR}/linphone-app/ui")
if (WIN32)
foreach (lang ${LANGUAGES})
@@ -0,0 +1,48 @@
diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp
index d0286a89a..483bc35e4 100644
--- a/linphone-app/src/components/call/CallModel.cpp
+++ b/linphone-app/src/components/call/CallModel.cpp
@@ -289,7 +289,7 @@ void CallModel::setRecordFile (const shared_ptr<linphone::CallParams> &callParam
callParams->setRecordFile(Utils::appStringToCoreString(
CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
.append(generateSavedFilename())
- .append(".mkv")
+ .append(".wav")
));
}
@@ -303,7 +303,7 @@ void CallModel::setRecordFile (const shared_ptr<linphone::CallParams> &callParam
callParams->setRecordFile(Utils::appStringToCoreString(
CoreManager::getInstance()->getSettingsModel()->getSavedCallsFolder()
.append(generateSavedFilename(from, to))
- .append(".mkv")
+ .append(".wav")
));
}
diff --git a/linphone-app/src/components/conference/ConferenceProxyModel.cpp b/linphone-app/src/components/conference/ConferenceProxyModel.cpp
index 0cf654dd4..931c0e5cf 100644
--- a/linphone-app/src/components/conference/ConferenceProxyModel.cpp
+++ b/linphone-app/src/components/conference/ConferenceProxyModel.cpp
@@ -84,7 +84,7 @@ void ConferenceProxyModel::startRecording () {
mLastRecordFile =
- QStringLiteral("%1%2.mkv")
+ QStringLiteral("%1%2.wav")
.arg(coreManager->getSettingsModel()->getSavedCallsFolder())
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss"));
conference->startRecording(Utils::appStringToCoreString(mLastRecordFile) );
diff --git a/linphone-app/src/components/recorder/RecorderModel.cpp b/linphone-app/src/components/recorder/RecorderModel.cpp
index 0d17ff6f8..5c6d7c679 100644
--- a/linphone-app/src/components/recorder/RecorderModel.cpp
+++ b/linphone-app/src/components/recorder/RecorderModel.cpp
@@ -83,7 +83,7 @@ QDateTime RecorderModel::getDateTimeSavedFilename(const QString& filename){
void RecorderModel::start(){
bool soFarSoGood;
- QString filename = QStringLiteral("vocal_%1.mkv")
+ QString filename = QStringLiteral("vocal_%1.wav")
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss-zzz"));
const QString safeFilePath = Utils::getSafeFilePath(
QStringLiteral("%1%2")
@@ -0,0 +1,15 @@
diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt
index d40842fa2..7d7bc57d8 100644
--- a/linphone-app/CMakeLists.txt
+++ b/linphone-app/CMakeLists.txt
@@ -40,10 +40,8 @@ set(version_minor)
set(version_patch)
set(identifiers )
set(metadata )
-bc_parse_full_version("${LINPHONEAPP_VERSION}" version_major version_minor version_patch identifiers metadata)
-project(linphoneqt VERSION "${version_major}.${version_minor}.${version_patch}")
if(ENABLE_BUILD_VERBOSE)
#message("CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}")
@@ -0,0 +1,41 @@
diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt
index d40842fa2..5ea1330ca 100644
--- a/linphone-app/CMakeLists.txt
+++ b/linphone-app/CMakeLists.txt
@@ -24,14 +24,11 @@ cmake_minimum_required(VERSION 3.22)
#Linphone targets
-set(LINPHONE_PACKAGES LinphoneCxx Mediastreamer2 Belcard LibLinphone)
+set(LINPHONE_PACKAGES LinphoneCxx Mediastreamer2 BelCard LibLinphone)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-find_package(BCToolbox)
-if(NOT BCToolbox_FOUND)
- find_package(bctoolbox CONFIG REQUIRED)
-endif()
+find_package(BCToolbox REQUIRED)
if(NOT LINPHONEAPP_VERSION)
bc_compute_full_version(LINPHONEAPP_VERSION)
endif()
@@ -105,17 +102,14 @@ set(ENABLE_DB_STORAGE ON CACHE BOOLEAN "Enable Storage")
foreach(PACKAGE ${LINPHONE_PACKAGES})
message(STATUS "Trying to find ${PACKAGE}")
- find_package(${PACKAGE})
- if(NOT ${PACKAGE}_FOUND)
- find_package(${PACKAGE} CONFIG REQUIRED)
- endif()
+ find_package(${PACKAGE} REQUIRED)
endforeach()
set(PLUGIN_TARGETS ${LinphoneCxx_TARGET})
set(APP_TARGETS ${LinphoneCxx_TARGET}
${BCToolbox_TARGET}#Logger/App
${Mediastreamer2_TARGET}#MediastreamerUtils
- ${Belcard_TARGET}#VCard Model
+ ${BelCard_TARGET}#VCard Model
${LibLinphone_TARGET})#MediastreamerUtils
####################################
@@ -0,0 +1,13 @@
diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt
index d40842fa2..112d45711 100644
--- a/linphone-app/CMakeLists.txt
+++ b/linphone-app/CMakeLists.txt
@@ -54,7 +54,6 @@ include(CheckCXXCompilerFlag)
set(TARGET_NAME linphone-qt)
-set(LINPHONE_QML_DIR "WORK/qml_files/ui")
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS true)
set(CMAKE_CXX_STANDARD 14)
@@ -0,0 +1,80 @@
{
bctoolbox,
bzrtp,
ffmpeg_4,
glew,
gsm,
lib,
libX11,
libXext,
libopus,
libpulseaudio,
libsForQt5,
libv4l,
libvpx,
mkLinphoneDerivation,
ortp,
python3,
speex,
sqlite,
srtp,
}:
mkLinphoneDerivation (finalAttrs: {
pname = "mediastreamer2";
dontWrapQtApps = true;
patches = [
# Plugins directory is normally fixed during compile time. This patch makes
# it possible to set the plugins directory run time with an environment
# variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a
# plugin directory with desired plugins and wrap executables so that the
# environment variable points to that directory.
./plugins_dir.patch
];
nativeBuildInputs = [
python3
libsForQt5.qtbase
libsForQt5.qtdeclarative
];
propagatedBuildInputs = [
# Made by BC
bctoolbox
bzrtp
ortp
ffmpeg_4
glew
libX11
libXext
libpulseaudio
libv4l
speex
srtp
sqlite
# Optional
gsm # GSM audio codec
libopus # Opus audio codec
libvpx # VP8 video codec
];
strictDeps = true;
cmakeFlags = [
"-DENABLE_QT_GL=ON" # Build necessary MSQOGL plugin for Linphone desktop
"-DCMAKE_C_FLAGS=-DGIT_VERSION=\"v${finalAttrs.version}\""
"-DENABLE_STRICT=NO" # Disable -Werror
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
];
NIX_LDFLAGS = "-lXext";
meta = {
description = "Powerful and lightweight streaming engine specialized for voice/video telephony applications. Part of the Linphone project";
license = lib.licenses.agpl3Plus;
platforms = lib.platforms.linux;
};
})
@@ -0,0 +1,18 @@
diff --git a/src/base/msfactory.c b/src/base/msfactory.c
index 14f868e3..2e3445a1 100644
--- a/src/base/msfactory.c
+++ b/src/base/msfactory.c
@@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
}
void ms_factory_init_plugins(MSFactory *obj) {
- if (obj->plugins_dir == NULL) {
+ char *package_plugins_dir;
+ // Force plugin dir from environment variable if set
+ package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
+ if (package_plugins_dir != NULL) {
+ ms_factory_set_plugins_dir(obj, package_plugins_dir);
+ } else if (obj->plugins_dir == NULL) {
#ifdef __APPLE__
char *dir = getPluginsDir();
if (dir != NULL) {
@@ -0,0 +1,61 @@
{
stdenv,
fetchFromGitLab,
lib,
cmake,
linphoneSdkVersion,
linphoneSdkHash,
}:
lib.extendMkDerivation {
constructDrv = stdenv.mkDerivation;
excludeDrvArgNames = [
"sourceRoot"
"version"
];
extendDrvArgs =
finalAttrs:
{
sourceRoot ? finalAttrs.pname,
nativeBuildInputs ? [ ],
cmakeFlags ? [ ],
...
}@args:
{
version = linphoneSdkVersion;
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
owner = "public";
group = "BC";
repo = "linphone-sdk";
tag = linphoneSdkVersion;
hash = linphoneSdkHash;
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
]
++ nativeBuildInputs;
sourceRoot = "${finalAttrs.src.name}/${sourceRoot}";
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
]
++ cmakeFlags;
meta = {
homepage = "https://gitlab.linphone.org/BC/public/linphone-sdk";
# maintainers for all linphone packages
maintainers = [
lib.maintainers.jluttine
lib.maintainers.naxdy
];
platforms = lib.platforms.all;
}
// (lib.optionalAttrs (args ? meta) args.meta);
};
}
@@ -0,0 +1,27 @@
{
mediastreamer2,
openh264,
lib,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "msopenh264";
buildInputs = [
mediastreamer2
openh264
];
# CMAKE_INSTALL_PREFIX has no effect so let's install manually. See:
# https://gitlab.linphone.org/BC/public/msopenh264/issues/1
installPhase = ''
mkdir -p $out/lib/mediastreamer/plugins
cp lib/mediastreamer2/plugins/libmsopenh264.so $out/lib/mediastreamer/plugins/
'';
meta = {
description = "H.264 encoder/decoder plugin for mediastreamer2. Part of the Linphone project";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,18 @@
{
bctoolbox,
lib,
mkLinphoneDerivation,
}:
mkLinphoneDerivation {
pname = "ortp";
env.NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation";
buildInputs = [ bctoolbox ];
meta = {
description = "Real-Time Transport Protocol (RFC3550) stack. Part of the Linphone project";
mainProgram = "ortp_tester";
license = lib.licenses.agpl3Plus;
};
}
+13 -13
View File
@@ -518,17 +518,17 @@ mapAliases {
bareboxTools = throw "bareboxTools has been removed due to lack of interest in maintaining it in nixpkgs"; # Added 2025-04-19
bazel_5 = throw "bazel_5 has been removed as it is EOL"; # Added 2025-08-09
bazel_6 = throw "bazel_6 has been removed as it will be EOL by the release of Nixpkgs 25.11"; # Added 2025-08-19
bc-decaf = throw "'bc-decaf' has been removed due to being unmaintained"; # Added 2025-09-20
bc-soci = throw "'bc-soci' has been removed due to being unmaintained"; # Added 2025-09-20
bctoolbox = throw "'bctoolbox' has been removed due to being unmaintained"; # Added 2025-09-20
bcunit = throw "'bcunit' has been removed due to being unmaintained"; # Added 2025-09-20
bc-decaf = throw "'bc-decaf' has been moved to 'linphonePackages.bc-decaf'"; # Added 2025-09-20
bc-soci = throw "'bc-soci' has been moved to 'linphonePackages.bc-soci'"; # Added 2025-09-20
bctoolbox = throw "'bctoolbox' has been moved to 'linphonePackages.bctoolbox'"; # Added 2025-09-20
bcunit = throw "'bcunit' has been moved to 'linphonePackages.bcunit'"; # Added 2025-09-20
BeatSaberModManager = beatsabermodmanager; # Added 2024-06-12
beam_nox = throw "beam_nox has been removed in favor of beam_minimal or beamMinimalPackages"; # Added 2025-04-01
beatsabermodmanager = throw "'beatsabermodmanager' has been removed due to lack of upstream maintainenance. Consider using 'bs-manager' instead"; # Added 2025-03-18
inherit (beetsPackages) beets-unstable;
belcard = throw "'belcard' has been removed due to being unmaintained"; # Added 2025-09-20
belle-sip = throw "'belle-sip' has been removed due to being unmaintained"; # Added 2025-09-20
belr = throw "'belr' has been removed due to being unmaintained"; # Added 2025-09-20
belcard = throw "'belcard' has been moved to 'linphonePackages.belcard'"; # Added 2025-09-20
belle-sip = throw "'belle-sip' has been moved to 'linphonePackages.belle-sip'"; # Added 2025-09-20
belr = throw "'belr' has been moved to 'linphonePackages.belr'"; # Added 2025-09-20
betterbird = throw "betterbird has been removed as there were insufficient maintainer resources to keep up with security updates"; # Added 2024-10-25
betterbird-unwrapped = throw "betterbird has been removed as there were insufficient maintainer resources to keep up with security updates"; # Added 2024-10-25
bfc = throw "bfc has been removed, as it does not build with supported LLVM versions"; # Added 2025-08-10
@@ -587,7 +587,7 @@ mapAliases {
bitwarden_rs-sqlite = vaultwarden-sqlite; # Added 2021-07-01
bitwarden_rs-vault = vaultwarden-vault; # Added 2021-07-01
bzrtp = throw "'bzrtp' has been removed due to being unmaintained"; # Added 2025-09-20
bzrtp = throw "'bzrtp' has been moved to 'linphonePackages.bzrtp'"; # Added 2025-09-20
### C ###
@@ -1367,7 +1367,7 @@ mapAliases {
libixp_hg = libixp; # Added 2022-04-25
libjpeg_drop = throw "'libjpeg_drop' has been renamed to/replaced by 'libjpeg_original'"; # Converted to throw 2024-10-17
liblastfm = throw "'liblastfm' has been renamed to/replaced by 'libsForQt5.liblastfm'"; # Converted to throw 2024-10-17
liblinphone = throw "'liblinphone' has been removed due to being unmaintained"; # Added 2025-09-20
liblinphone = throw "'liblinphone' has been moved to 'linphonePackages.liblinphone'"; # Added 2025-09-20
libmp3splt = throw "'libmp3splt' has been removed due to lack of maintenance upstream."; # Added 2025-05-17
libmusicbrainz3 = throw "libmusicbrainz3 has been removed as it was obsolete and unused"; # Added 2025-09-16
libmusicbrainz5 = libmusicbrainz; # Added 2025-09-16
@@ -1421,7 +1421,7 @@ mapAliases {
lime = throw "'lime' has been removed due to being unmaintained"; # Added 2025-03-20
limesctl = throw "limesctl has been removed because it is insignificant."; # Added 2024-11-25
linenoise-ng = throw "'linenoise-ng' has been removed as the upstream project was archived. Consider using 'linenoise' instead."; # Added 2025-05-05
linphone = throw "'linphone' has been removed due to being unmaintained"; # Added 2025-09-20
linphone = linphonePackages.linphone-desktop; # Added 2025-09-20
lispPackages_new = throw "Lisp packages have been redesigned. See 'lisp-modules' in the nixpkgs manual."; # Added 2024-05-07
lispPackages = throw "Lisp packages have been redesigned. See 'lisp-modules' in the nixpkgs manual."; # Added 2024-05-07
lispPackagesFor = throw "Lisp packages have been redesigned. See 'lisp-modules' in the nixpkgs manual."; # Added 2024-05-07
@@ -1713,8 +1713,8 @@ mapAliases {
mcomix3 = mcomix; # Added 2022-06-05
mdt = md-tui; # Added 2024-09-03
meilisearch_1_11 = throw "'meilisearch_1_11' has been removed, as it is no longer supported"; # Added 2025-10-03
mediastreamer = throw "'mediastreamer' has been removed due to being unmaintained"; # Added 2025-09-20
mediastreamer-openh264 = throw "'mediastreamer-openh264' has been removed due to being unmaintained"; # Added 2025-09-20
mediastreamer = throw "'mediastreamer' has been moved to 'linphonePackages.mediastreamer2'"; # Added 2025-09-20
mediastreamer-openh264 = throw "'mediastreamer-openh264' has been moved to 'linphonePackages.msopenh264'"; # Added 2025-09-20
meme = throw "'meme' has been renamed to/replaced by 'meme-image-generator'"; # Converted to throw 2024-10-17
memorymapping = throw "memorymapping has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05
memorymappingHook = throw "memorymapping has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05
@@ -2018,7 +2018,7 @@ mapAliases {
openvdb_11 = throw "'openvdb_11' has been removed in favor of the latest version'"; # Added 2025-05-03
opera = throw "'opera' has been removed due to lack of maintenance in nixpkgs"; # Added 2025-05-19
orchis = throw "'orchis' has been renamed to/replaced by 'orchis-theme'"; # Converted to throw 2024-10-17
ortp = throw "'ortp' has been removed due to being unmaintained"; # Added 2025-09-20
ortp = throw "'ortp' has been moved to 'linphonePackages.ortp'"; # Added 2025-09-20
omping = throw "'omping' has been removed because its upstream has been archived"; # Added 2025-05-10
onlyoffice-bin = onlyoffice-desktopeditors; # Added 2024-09-20
onlyoffice-bin_latest = onlyoffice-bin; # Added 2024-07-03
+4
View File
@@ -12759,6 +12759,10 @@ with pkgs;
twinkle = qt5.callPackage ../applications/networking/instant-messengers/twinkle { };
linphonePackages = recurseIntoAttrs (
callPackage ../applications/networking/instant-messengers/linphone { }
);
buildTypstPackage = callPackage ../build-support/build-typst-package.nix { };
typstPackages = typst.packages;