Files
nixpkgs/pkgs/development/libraries/speex/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1.1 KiB
Nix

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