diff --git a/pkgs/development/libraries/spandsp/3.nix b/pkgs/development/libraries/spandsp/3.nix index ceb53e05744e6..92af122386fb3 100644 --- a/pkgs/development/libraries/spandsp/3.nix +++ b/pkgs/development/libraries/spandsp/3.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, audiofile, libtiff, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, audiofile, libtiff, autoreconfHook +, fetchpatch +, buildPackages }: stdenv.mkDerivation rec { version = "3.0.0"; pname = "spandsp"; @@ -9,11 +11,24 @@ stdenv.mkDerivation rec { sha256 = "03w0s99y3zibi5fnvn8lk92dggfgrr0mz5255745jfbz28b2d5y7"; }; + patches = [ + # submitted upstream: https://github.com/freeswitch/spandsp/pull/47 + (fetchpatch { + url = "https://github.com/freeswitch/spandsp/commit/1f810894804d3fa61ab3fc2f3feb0599145a3436.patch"; + hash = "sha256-Cf8aaoriAvchh5cMb75yP2gsZbZaOLha/j5mq3xlkVA="; + }) + ]; + outputs = [ "out" "dev" ]; nativeBuildInputs = [ autoreconfHook ]; propagatedBuildInputs = [ audiofile libtiff ]; + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/cc" + ]; + meta = { description = "A portable and modular SIP User-Agent with audio and video support"; homepage = "https://github.com/freeswitch/spandsp"; diff --git a/pkgs/development/libraries/spandsp/default.nix b/pkgs/development/libraries/spandsp/default.nix index 2c96e60c6d376..b7fa9388e75c2 100644 --- a/pkgs/development/libraries/spandsp/default.nix +++ b/pkgs/development/libraries/spandsp/default.nix @@ -1,7 +1,19 @@ -{ lib, stdenv, fetchurl, audiofile, libtiff, buildPackages }: +{ lib, stdenv, fetchurl, audiofile, libtiff, buildPackages +, fetchpatch +, autoreconfHook }: + stdenv.mkDerivation rec { version = "0.0.6"; pname = "spandsp"; + + patches = [ + # submitted upstream: https://github.com/freeswitch/spandsp/pull/47 + (fetchpatch { + url = "https://github.com/freeswitch/spandsp/commit/1f810894804d3fa61ab3fc2f3feb0599145a3436.patch"; + hash = "sha256-Cf8aaoriAvchh5cMb75yP2gsZbZaOLha/j5mq3xlkVA="; + }) + ]; + src=fetchurl { url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz"; sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"; @@ -21,6 +33,7 @@ stdenv.mkDerivation rec { ]; strictDeps = true; + nativeBuildInputs = [ autoreconfHook ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; propagatedBuildInputs = [audiofile libtiff]; meta = {