Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spandsp: fix cross compilation #218477

Merged
merged 2 commits into from Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }:
This conversation was marked as resolved.
Show resolved Hide resolved

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