1{ lib, stdenv, fetchurl
2, fixedPoint ? false, withCustomModes ? true }:
3
4stdenv.mkDerivation rec {
5 pname = "libopus";
6 version = "1.3.1";
7
8 src = fetchurl {
9 url = "mirror://mozilla/opus/opus-${version}.tar.gz";
10 sha256 = "17gz8kxs4i7icsc1gj713gadiapyklynlwqlf0ai98dj4lg8xdb5";
11 };
12
13 outputs = [ "out" "dev" ];
14
15 configureFlags = lib.optional fixedPoint "--enable-fixed-point"
16 ++ lib.optional withCustomModes "--enable-custom-modes";
17
18 doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails
19
20 meta = with lib; {
21 description = "Open, royalty-free, highly versatile audio codec";
22 license = lib.licenses.bsd3;
23 homepage = "https://www.opus-codec.org/";
24 platforms = platforms.all;
25 };
26}