chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ba / baresip / package.nix
blobea92f9c39fa0be4e6d2f6a7759789e00c75523dc
2   SDL2,
3   alsa-lib,
4   cairo,
5   celt,
6   cmake,
7   fetchFromGitHub,
8   ffmpeg,
9   glib,
10   gsm,
11   gst_all_1,
12   gtk3,
13   lib,
14   libre,
15   librem,
16   libsndfile,
17   libuuid,
18   libv4l,
19   libvpx,
20   mpg123,
21   openssl,
22   pipewire,
23   pkg-config,
24   portaudio,
25   spandsp3,
26   speex,
27   srtp,
28   stdenv,
29   zlib,
30   dbusSupport ? true,
32 stdenv.mkDerivation rec {
33   version = "3.10.1";
34   pname = "baresip";
35   src = fetchFromGitHub {
36     owner = "baresip";
37     repo = "baresip";
38     rev = "v${version}";
39     hash = "sha256-0huZP1hopHaN5R1Hki6YutpvoASfIHzHMl/Y4czHHMo=";
40   };
41   prePatch = ''
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)' ""
45   '';
46   nativeBuildInputs = [ cmake pkg-config ];
47   buildInputs = [
48     SDL2
49     alsa-lib
50     cairo
51     celt
52     ffmpeg
53     gsm
54     gtk3
55     libre
56     librem
57     libsndfile
58     libuuid
59     libv4l
60     libvpx
61     mpg123
62     openssl
63     pipewire
64     portaudio
65     spandsp3
66     speex
67     srtp
68     zlib
69   ] ++ (with gst_all_1; [ gstreamer gst-libav gst-plugins-base gst-plugins-bad gst-plugins-good ]);
71   cmakeFlags = [
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"
77   ];
79   makeFlags = [
80     "PREFIX=$(out)"
81     "CCACHE_DISABLE=1"
82   ]
83   ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
84   ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
85   ;
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") [
97     "account"
98     "alsa"
99     "aubridge"
100     "auconv"
101     "aufile"
102     "auresamp"
103     "ausine"
104     "avcodec"
105     "avfilter"
106     "avformat"
107     "cons"
108     "contact"
109     "ctrl_dbus"
110     "ctrl_tcp"
111     "debug_cmd"
112     "dtls_srtp"
113     "ebuacip"
114     "echo"
115     "evdev"
116     "fakevideo"
117     "g711"
118     "g722"
119     "g726"
120     "gst"
121     "gtk"
122     "httpd"
123     "httpreq"
124     "ice"
125     "l16"
126     "menu"
127     "mixausrc"
128     "mixminus"
129     "multicast"
130     "mwi"
131     "natpmp"
132     "netroam"
133     "pcp"
134     "pipewire"
135     "plc"
136     "portaudio"
137     "presence"
138     "rtcpsummary"
139     "sdl"
140     "selfview"
141     "serreg"
142     "snapshot"
143     "sndfile"
144     "srtp"
145     "stdio"
146     "stun"
147     "swscale"
148     "syslog"
149     "turn"
150     "uuid"
151     "v4l2"
152     "vidbridge"
153     "vidinfo"
154     "vp8"
155     "vp9"
156     "vumeter"
157     "x11"
158   ];
160   meta = {
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;
167   };