From 50bd5730c4d12fcdfed3c296b5e3c87834cdbcae Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 13 May 2023 04:20:00 +0000 Subject: [PATCH 1/2] libopus: 1.3.1 -> 1.4 https://gitlab.xiph.org/xiph/opus/-/releases/v1.4 --- .../development/libraries/libopus/default.nix | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix index 7c563e081d01..67db87410810 100644 --- a/pkgs/development/libraries/libopus/default.nix +++ b/pkgs/development/libraries/libopus/default.nix @@ -1,26 +1,45 @@ -{ lib, stdenv, fetchurl -, fixedPoint ? false, withCustomModes ? true }: +{ lib +, stdenv +, fetchurl +, meson +, python3 +, ninja +, fixedPoint ? false +, withCustomModes ? true +}: stdenv.mkDerivation rec { pname = "libopus"; - version = "1.3.1"; + version = "1.4"; src = fetchurl { - url = "mirror://mozilla/opus/opus-${version}.tar.gz"; - sha256 = "17gz8kxs4i7icsc1gj713gadiapyklynlwqlf0ai98dj4lg8xdb5"; + url = "https://downloads.xiph.org/releases/opus/opus-${version}.tar.gz"; + sha256 = "sha256-ybMrQlO+WuY9H/Fu6ga5S18PKVG3oCrO71jjo85JxR8="; }; outputs = [ "out" "dev" ]; - configureFlags = lib.optional fixedPoint "--enable-fixed-point" - ++ lib.optional withCustomModes "--enable-custom-modes"; + nativeBuildInputs = [ + meson + python3 + ninja + ]; + + mesonFlags = [ + (lib.mesonBool "fixed-point" fixedPoint) + (lib.mesonBool "custom-modes" withCustomModes) + (lib.mesonEnable "asm" stdenv.hostPlatform.isAarch) + (lib.mesonEnable "docs" false) + ]; doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails meta = with lib; { description = "Open, royalty-free, highly versatile audio codec"; - license = lib.licenses.bsd3; - homepage = "https://www.opus-codec.org/"; + homepage = "https://opus-codec.org/"; + changelog = "https://gitlab.xiph.org/xiph/opus/-/releases/v${version}"; + license = licenses.bsd3; platforms = platforms.all; + maintainers = [ ]; }; } From dcfcce73a2e4b5681caa875722190328395c6cfe Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 13 May 2023 04:20:00 +0000 Subject: [PATCH 2/2] fixup! libopus: 1.3.1 -> 1.4 --- pkgs/development/libraries/libopus/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix index 67db87410810..7694412efe03 100644 --- a/pkgs/development/libraries/libopus/default.nix +++ b/pkgs/development/libraries/libopus/default.nix @@ -32,6 +32,10 @@ stdenv.mkDerivation rec { (lib.mesonEnable "docs" false) ]; + preBuild = '' + patchShebangs meson/get-version.py + ''; + doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails meta = with lib; {