Skip to content

Commit

Permalink
Merge pull request #218477 from amjoseph-nixpkgs/pr/spandsp/fix-cross2
Browse files Browse the repository at this point in the history
spandsp: fix cross compilation
  • Loading branch information
7c6f434c authored Mar 9, 2023
2 parents 6d1fadf + 6b0e096 commit 4241c2d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
17 changes: 16 additions & 1 deletion pkgs/development/libraries/spandsp/3.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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";
Expand Down
15 changes: 14 additions & 1 deletion pkgs/development/libraries/spandsp/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -21,6 +33,7 @@ stdenv.mkDerivation rec {
];

strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
propagatedBuildInputs = [audiofile libtiff];
meta = {
Expand Down

0 comments on commit 4241c2d

Please sign in to comment.