1{ lib, stdenv, fetchurl, audiofile, libtiff, buildPackages }:
2stdenv.mkDerivation rec {
3 version = "0.0.6";
4 pname = "spandsp";
5 src=fetchurl {
6 url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz";
7 sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc";
8 };
9
10 outputs = [ "out" "dev" ];
11 makeFlags = [
12 "CC=${stdenv.cc.targetPrefix}cc"
13 ];
14
15 configureFlags = [
16 # This flag is required to prevent linking error in the cross-compilation case.
17 # I think it's fair to assume that realloc(NULL, size) will return a valid memory
18 # block for most libc implementation, so let's just assume that and hope for the best.
19 "ac_cv_func_malloc_0_nonnull=yes"
20 ];
21
22 strictDeps = true;
23 depsBuildBuild = [ buildPackages.stdenv.cc ];
24 propagatedBuildInputs = [audiofile libtiff];
25 meta = {
26 description = "A portable and modular SIP User-Agent with audio and video support";
27 homepage = "http://www.creytiv.com/baresip.html";
28 platforms = with lib.platforms; linux;
29 maintainers = with lib.maintainers; [raskin];
30 license = lib.licenses.gpl2;
31 downloadPage = "http://www.soft-switch.org/downloads/spandsp/";
32 updateWalker = true;
33 };
34}