nixpkgs/pkgs/development/libraries/speex/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, autoreconfHook
, pkg-config
, fftw
, speexdsp
, withFft ? !stdenv.hostPlatform.isMinGW
}:
stdenv.mkDerivation rec {
pname = "speex";
version = "1.2.1";
2012-08-25 03:14:45 +00:00
src = fetchurl {
url = "http://downloads.us.xiph.org/releases/speex/speex-${version}.tar.gz";
sha256 = "sha256-S0TU8rOKNwotmKeDKf78VqDPk9HBvnACkhe6rmYo/uo=";
};
2012-08-25 03:14:45 +00:00
2015-04-25 22:04:54 +00:00
postPatch = ''
sed -i '/AC_CONFIG_MACRO_DIR/i PKG_PROG_PKG_CONFIG' configure.ac
'';
2012-08-25 03:14:45 +00:00
outputs = [ "out" "dev" "doc" ];
2012-08-25 03:14:45 +00:00
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = lib.optionals withFft [ fftw ]
++ [ speexdsp ];
2015-04-25 22:04:54 +00:00
2023-05-20 02:11:55 +00:00
# TODO: Remove this will help with immediate backward compatibility
2015-04-25 22:04:54 +00:00
propagatedBuildInputs = [ speexdsp ];
configureFlags = lib.optionals withFft [
2015-04-25 22:04:54 +00:00
"--with-fft=gpl-fftw3"
];
meta = with lib; {
homepage = "https://www.speex.org/";
description = "Open Source/Free Software patent-free audio compression format designed for speech";
2015-04-25 22:04:54 +00:00
license = licenses.bsd3;
platforms = platforms.unix ++ platforms.windows;
2012-08-25 03:14:45 +00:00
};
}