Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

104 lines
2.3 KiB
Nix

{
bctoolbox,
bzrtp,
cmake,
fetchFromGitLab,
fetchpatch2,
ffmpeg,
glew,
gsm,
lib,
libX11,
libXext,
libopus,
libpulseaudio,
libv4l,
libvpx,
ortp,
python3,
qtbase,
qtdeclarative,
speex,
srtp,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "mediastreamer2";
version = "5.2.111";
dontWrapQtApps = true;
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
owner = "public";
group = "BC";
repo = pname;
rev = version;
hash = "sha256-Le52tsyzOpepmvb+GOGCPwwTriPUjhYpa6GM+y/6USA=";
};
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
# Port to ffmpeg 5.0 API
(fetchpatch2 {
url = "https://salsa.debian.org/pkg-voip-team/linphone-stack/mediastreamer2/-/raw/4e7784802d2eac57dffe210c8c23e696f40ac6ec/debian/patches/ffmpeg_5_0_fixes.patch";
hash = "sha256-5ay4iVbx8IOX952HEFaKLBGKLRYUWRntufciApUVhh0=";
})
];
nativeBuildInputs = [
cmake
python3
qtbase
qtdeclarative
];
propagatedBuildInputs = [
# Made by BC
bctoolbox
bzrtp
ortp
ffmpeg
glew
libX11
libXext
libpulseaudio
libv4l
speex
srtp
# Optional
gsm # GSM audio codec
libopus # Opus audio codec
libvpx # VP8 video codec
];
strictDeps = true;
cmakeFlags = [
"-DENABLE_STATIC=NO" # Do not build static libraries
"-DENABLE_QT_GL=ON" # Build necessary MSQOGL plugin for Linphone desktop
"-DCMAKE_C_FLAGS=-DGIT_VERSION=\"v${version}\""
"-DENABLE_STRICT=NO" # Disable -Werror
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
];
NIX_LDFLAGS = "-lXext";
meta = with lib; {
description = "Powerful and lightweight streaming engine specialized for voice/video telephony applications. Part of the Linphone project";
homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ jluttine ];
};
}