mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.opuslib-next: init at 1.3.0
Native bindings to libopus; new dependency for voip-utils.
This commit is contained in:
parent
a8c131e4b8
commit
c3a8d36e3f
3 changed files with 69 additions and 0 deletions
13
pkgs/development/python-modules/opuslib-next/ctypes.patch
Normal file
13
pkgs/development/python-modules/opuslib-next/ctypes.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/opuslib_next/api/__init__.py b/opuslib_next/api/__init__.py
|
||||
index dc498b2..b2ded08 100644
|
||||
--- a/opuslib_next/api/__init__.py
|
||||
+++ b/opuslib_next/api/__init__.py
|
||||
@@ -15,7 +15,7 @@ __copyright__ = "Copyright (c) 2025, Kalicyh"
|
||||
__license__ = "BSD 3-Clause License"
|
||||
|
||||
|
||||
-lib_location = find_library("opus")
|
||||
+lib_location = "@libopus@"
|
||||
|
||||
if lib_location is None:
|
||||
# find opus library in macOS
|
||||
54
pkgs/development/python-modules/opuslib-next/default.nix
Normal file
54
pkgs/development/python-modules/opuslib-next/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
libopus,
|
||||
pytestCheckHook,
|
||||
replaceVars,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "opuslib-next";
|
||||
version = "1.3.0";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kalicyh";
|
||||
repo = "opuslib-next";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-rR1tsijKUBUH3bZZSISsx1JUO35TZevcTcfPtoQow/E=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./ctypes.patch {
|
||||
libopus = "${lib.getLib libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [
|
||||
hatchling
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libopus
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"opuslib_next"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Python bindings to the libopus, IETF low-delay audio codec";
|
||||
homepage = "https://github.com/kalicyh/opuslib-next";
|
||||
changelog = "https://github.com/kalicyh/opuslib-next/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ hexa ];
|
||||
};
|
||||
})
|
||||
|
|
@ -12250,6 +12250,8 @@ self: super: with self; {
|
|||
|
||||
opuslib = callPackage ../development/python-modules/opuslib { };
|
||||
|
||||
opuslib-next = callPackage ../development/python-modules/opuslib-next { };
|
||||
|
||||
opytimark = callPackage ../development/python-modules/opytimark { };
|
||||
|
||||
oracledb = callPackage ../development/python-modules/oracledb { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue