1 { stdenv, lib, fetchPypi, buildPythonPackage, libvorbis, flac, libogg, libopus, opusfile, substituteAll }:
3 buildPythonPackage rec {
9 sha256 = "0xabqwyknpvfc53s7il5pq6b07fcaqvz5bi5vbs3pbaw8602qvim";
12 buildInputs = [ libvorbis flac libogg libopus ];
13 propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ];
14 # There are no tests in this package.
16 patchFlags = [ "-p1" "--binary" ]; # patch has dos style eol
19 src = ./pyogg-paths.patch;
20 flacLibPath="${flac.out}/lib/libFLAC${stdenv.hostPlatform.extensions.sharedLibrary}";
21 oggLibPath="${libogg}/lib/libogg${stdenv.hostPlatform.extensions.sharedLibrary}";
22 vorbisLibPath="${libvorbis}/lib/libvorbis${stdenv.hostPlatform.extensions.sharedLibrary}";
23 vorbisFileLibPath="${libvorbis}/lib/libvorbisfile${stdenv.hostPlatform.extensions.sharedLibrary}";
24 vorbisEncLibPath="${libvorbis}/lib/libvorbisenc${stdenv.hostPlatform.extensions.sharedLibrary}";
25 opusLibPath="${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}";
26 opusFileLibPath="${opusfile}/lib/libopusfile${stdenv.hostPlatform.extensions.sharedLibrary}";
31 description = "Xiph.org's Ogg Vorbis, Opus and FLAC for Python";
32 homepage = "https://github.com/Zuzu-Typ/PyOgg";
33 license = lib.licenses.publicDomain;
34 maintainers = with lib.maintainers; [ pmiddend ];