anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / development / libraries / spandsp / common.nix
blob61439924b749d4814dcc1b3a9c016a8c5ba37fd8
1 { lib
2 , stdenv
3 , audiofile
4 , libtiff
5 , buildPackages
6 , fetchpatch
7 , autoreconfHook
8 }:
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "spandsp";
13   patches = [
14     # submitted upstream: https://github.com/freeswitch/spandsp/pull/47
15     (fetchpatch {
16       url = "https://github.com/freeswitch/spandsp/commit/1f810894804d3fa61ab3fc2f3feb0599145a3436.patch";
17       hash = "sha256-Cf8aaoriAvchh5cMb75yP2gsZbZaOLha/j5mq3xlkVA=";
18     })
19   ];
21   outputs = [ "out" "dev" ];
23   nativeBuildInputs = [ autoreconfHook ];
24   depsBuildBuild = [ buildPackages.stdenv.cc ];
25   propagatedBuildInputs = [ audiofile libtiff ];
27   configureFlags = [
28     # This flag is required to prevent linking error in the cross-compilation case.
29     # I think it's fair to assume that realloc(NULL, size) will return a valid memory
30     # block for most libc implementation, so let's just assume that and hope for the best.
31     "ac_cv_func_malloc_0_nonnull=yes"
32   ];
34   enableParallelBuilding = true;
36   makeFlags = [
37     "CC=${stdenv.cc.targetPrefix}cc"
38     "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/cc"
39   ];
41   strictDeps = true;
43   meta = {
44     description = "Portable and modular SIP User-Agent with audio and video support";
45     homepage = "https://github.com/freeswitch/spandsp";
46     platforms = with lib.platforms; unix;
47     maintainers = with lib.maintainers; [ misuzu ];
48     license = lib.licenses.gpl2;
49     downloadPage = "http://www.soft-switch.org/downloads/spandsp/";
50   };