nixpkgs/pkgs/by-name/li/libopus/package.nix

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

84 lines
1.8 KiB
Nix
Raw Normal View History

2024-06-12 01:18:45 +01:00
{
lib,
stdenv,
fetchurl,
gitUpdater,
meson,
python3,
ninja,
fixedPoint ? false,
withCustomModes ? true,
withIntrinsics ? stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isx86,
withAsm ? false,
2024-06-12 01:18:45 +01:00
# tests
ffmpeg-headless,
testers,
}:
2024-03-04 04:20:00 +00:00
stdenv.mkDerivation (finalAttrs: {
2019-08-13 22:52:01 +01:00
pname = "libopus";
version = "1.5.2";
src = fetchurl {
2024-03-04 04:20:00 +00:00
url = "https://downloads.xiph.org/releases/opus/opus-${finalAttrs.version}.tar.gz";
hash = "sha256-ZcHS94ufL7IAgsOMvkfJUa1YOTRYduRpQWEu6H+afOE=";
};
2023-06-11 14:00:00 +01:00
patches = [
# Some tests time out easily on slower machines
./test-timeout.patch
2023-06-11 14:00:00 +01:00
];
2023-06-11 12:24:48 +01:00
postPatch = ''
patchShebangs meson/
'';
2024-06-12 01:18:45 +01:00
outputs = [
"out"
"dev"
];
2015-10-08 10:25:09 +01:00
nativeBuildInputs = [
meson
python3
ninja
];
mesonFlags = [
(lib.mesonBool "fixed-point" fixedPoint)
(lib.mesonBool "custom-modes" withCustomModes)
(lib.mesonEnable "intrinsics" withIntrinsics)
(lib.mesonEnable "rtcd" (withIntrinsics || withAsm))
(lib.mesonEnable "asm" withAsm)
(lib.mesonEnable "docs" false)
];
2021-08-12 16:00:15 +01:00
doCheck = !stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isAarch32; # test_unit_LPC_inv_pred_gain fails
2024-03-04 04:20:00 +00:00
passthru = {
updateScript = gitUpdater {
url = "https://gitlab.xiph.org/xiph/opus.git";
rev-prefix = "v";
};
tests = {
inherit ffmpeg-headless;
2024-03-04 04:20:00 +00:00
2024-03-04 04:20:00 +00:00
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "opus" ];
};
2024-03-04 04:20:00 +00:00
};
};
meta = {
description = "Open, royalty-free, highly versatile audio codec";
homepage = "https://opus-codec.org/";
2024-03-04 04:20:00 +00:00
changelog = "https://gitlab.xiph.org/xiph/opus/-/releases/v${finalAttrs.version}";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
2024-06-12 08:45:39 +01:00
maintainers = with lib.maintainers; [ getchoo jopejoe1 ];
};
2024-03-04 04:20:00 +00:00
})