Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pyogg / default.nix
blob3edf3768956f197cf0fb9a046e574998bc598b66
1 { stdenv, lib, fetchPypi, buildPythonPackage, libvorbis, flac, libogg, libopus, opusfile, substituteAll }:
3 buildPythonPackage rec {
4     pname = "PyOgg";
5     version = "0.6.9a1";
7     src = fetchPypi {
8       inherit pname version;
9       sha256 = "0xabqwyknpvfc53s7il5pq6b07fcaqvz5bi5vbs3pbaw8602qvim";
10     };
12     buildInputs = [ libvorbis flac libogg libopus ];
13     propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ];
14     # There are no tests in this package.
15     doCheck = false;
16     patchFlags = [ "-p1" "--binary" ]; # patch has dos style eol
17     patches = [
18       (substituteAll {
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}";
27       })
28     ];
30   meta = {
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 ];
35   };