1{ buildPythonPackage,
2 fetchFromGitHub,
3 isPy27,
4 libopus,
5 nose,
6 lib, stdenv,
7 substituteAll,
8}:
9
10buildPythonPackage rec {
11 pname = "opuslib";
12 version = "3.0.3";
13
14 disabled = isPy27;
15
16 src = fetchFromGitHub {
17 owner = "orion-labs";
18 repo = "opuslib";
19 rev = "92109c528f9f6c550df5e5325ca0fcd4f86b0909";
20 sha256 = "0kd37wimwd1g6c0w5hq2hiiljgbi1zg3rk5prval086khkzq469p";
21 };
22
23 patches = [
24 (substituteAll {
25 src = ./opuslib-paths.patch;
26 opusLibPath = "${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}";
27 })
28 ];
29
30 checkInputs = [ nose ];
31
32 meta = with lib; {
33 description = "Python bindings to the libopus, IETF low-delay audio codec";
34 homepage = "https://github.com/orion-labs/opuslib";
35 license = licenses.bsd3;
36 platforms = platforms.all;
37 maintainers = with maintainers; [ thelegy ];
38 };
39}