2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, fftw
|
2024-02-29 20:09:43 +00:00
|
|
|
, withFftw3 ? (!stdenv.hostPlatform.isMinGW)
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "speexdsp";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://downloads.xiph.org/releases/speex/${pname}-${version}.tar.gz";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-jHdzQ+SmOZVpxyq8OKlbJNtWiCyD29tsZCSl9K61TT0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./build-fix.patch ];
|
|
|
|
postPatch = "sed '3i#include <stdint.h>' -i ./include/speex/speexdsp_config_types.h.in";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = lib.optionals withFftw3 [ fftw ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
configureFlags = lib.optionals withFftw3 [ "--with-fft=gpl-fftw3" ]
|
|
|
|
++ lib.optional stdenv.isAarch64 "--disable-neon";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.speex.org/";
|
|
|
|
description = "An Open Source/Free Software patent-free audio compression format designed for speech";
|
|
|
|
license = licenses.bsd3;
|
2024-02-29 20:09:43 +00:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|