2019-04-03 13:14:52 +01:00
|
|
|
{ stdenv, lib, fetchPypi, buildPythonPackage, libvorbis, flac, libogg, libopus, opusfile, substituteAll }:
|
2018-05-21 18:28:22 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyOgg";
|
2019-04-03 13:14:52 +01:00
|
|
|
version = "0.6.9a1";
|
2018-05-21 18:28:22 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-03 13:14:52 +01:00
|
|
|
sha256 = "0xabqwyknpvfc53s7il5pq6b07fcaqvz5bi5vbs3pbaw8602qvim";
|
2018-05-21 18:28:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libvorbis flac libogg libopus ];
|
|
|
|
propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ];
|
|
|
|
# There are no tests in this package.
|
|
|
|
doCheck = false;
|
2019-04-03 13:14:52 +01:00
|
|
|
patchFlags = [ "-p1" "--binary" ]; # patch has dos style eol
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./pyogg-paths.patch;
|
|
|
|
flacLibPath="${flac.out}/lib/libFLAC${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
oggLibPath="${libogg}/lib/libogg${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
vorbisLibPath="${libvorbis}/lib/libvorbis${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
vorbisFileLibPath="${libvorbis}/lib/libvorbisfile${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
vorbisEncLibPath="${libvorbis}/lib/libvorbisenc${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
opusLibPath="${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
opusFileLibPath="${opusfile}/lib/libopusfile${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
2018-05-21 18:28:22 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Xiph.org's Ogg Vorbis, Opus and FLAC for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Zuzu-Typ/PyOgg";
|
2018-05-21 18:28:22 +01:00
|
|
|
license = lib.licenses.publicDomain;
|
|
|
|
maintainers = with lib.maintainers; [ pmiddend ];
|
|
|
|
};
|
|
|
|
}
|