32 stdenv.mkDerivation rec {
35 src = fetchFromGitHub {
39 hash = "sha256-0huZP1hopHaN5R1Hki6YutpvoASfIHzHMl/Y4czHHMo=";
42 substituteInPlace cmake/FindGTK3.cmake --replace-fail GTK3_CFLAGS_OTHER ""
43 '' + lib.optionalString (!dbusSupport) ''
44 substituteInPlace cmake/modules.cmake --replace-fail 'list(APPEND MODULES ctrl_dbus)' ""
46 nativeBuildInputs = [ cmake pkg-config ];
69 ] ++ (with gst_all_1; [ gstreamer gst-libav gst-plugins-base gst-plugins-bad gst-plugins-good ]);
72 "-DCMAKE_SKIP_BUILD_RPATH=ON"
73 "-Dre_DIR=${libre}/include/re"
74 "-DGL_INCLUDE_DIRS=${lib.getDev glib}/include/glib-2.0"
75 "-DGLIB_INCLUDE_DIRS=${glib.out}/lib/glib-2.0/include"
76 "-DGST_INCLUDE_DIRS=${lib.getDev gst_all_1.gstreamer}/include/gstreamer-1.0"
83 ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
84 ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
87 enableParallelBuilding = true;
89 env.NIX_CFLAGS_COMPILE = '' -I${librem}/include/rem -I${gsm}/include/gsm
90 -DHAVE_INTTYPES_H -D__GLIBC__
91 -D__need_timeval -D__need_timespec -D__need_time_t '';
93 doInstallCheck = true;
94 # CMake feature detection is prone to breakage between upgrades:
95 # spot-check that the optional modules we care about were compiled
96 postInstallCheck = lib.concatMapStringsSep "\n" (m: "test -x $out/lib/baresip/modules/${m}.so") [
161 description = "Modular SIP User-Agent with audio and video support";
162 homepage = "https://github.com/baresip/baresip";
163 maintainers = with lib.maintainers; [ raskin ehmry ];
164 mainProgram = "baresip";
165 license = lib.licenses.bsd3;
166 platforms = lib.platforms.unix;