diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-05-22 17:48:29 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-05-22 17:48:29 +0300 |
commit | f9feacfc7c389bacb937e24d7cccfe013271efaa (patch) | |
tree | 264c2e15652058f1f1dc16fa4739d453c533ba58 /pkgs/development/python-modules/pyogg/default.nix | |
parent | db4d77779c9b52a35c5a4306d36e2727cba1b162 (diff) | |
parent | c8a4562f5966e90cbbe04195b4a37a5d4a334f60 (diff) | |
download | nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.gz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.bz2 nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.lz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.xz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.zst nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.zip |
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'pkgs/development/python-modules/pyogg/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyogg/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyogg/default.nix b/pkgs/development/python-modules/pyogg/default.nix new file mode 100644 index 000000000000..08fc87127959 --- /dev/null +++ b/pkgs/development/python-modules/pyogg/default.nix @@ -0,0 +1,39 @@ +{ stdenv, lib, fetchPypi, buildPythonPackage, fetchurl, libvorbis, flac, libogg, libopus, opusfile }: + +buildPythonPackage rec { + pname = "PyOgg"; + version = "0.6.2a1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1mjh5zx7mfy246lya1qc42j4q4pz6v5zbd8blnfib9ncswcb1v6l"; + }; + + buildInputs = [ libvorbis flac libogg libopus ]; + propagatedBuidInputs = [ libvorbis flac libogg libopus opusfile ]; + # There are no tests in this package. + doCheck = false; + postPatch = '' + substituteInPlace pyogg/vorbis.py --replace \ + 'libvorbisfile = ExternalLibrary.load("vorbisfile")' "libvorbisfile = ctypes.CDLL('${libvorbis}/lib/libvorbisfile${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/vorbis.py --replace \ + 'libvorbisenc = ExternalLibrary.load("vorbisenc")' "libvorbisenc = ctypes.CDLL('${libvorbis}/lib/libvorbisenc${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/vorbis.py --replace \ + 'libvorbis = ExternalLibrary.load("vorbis")' "libvorbis = ctypes.CDLL('${libvorbis}/lib/libvorbis${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/flac.py --replace \ + 'libflac = ExternalLibrary.load("flac")' "libflac = ctypes.CDLL('${flac.out}/lib/libFLAC${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/ogg.py --replace \ + 'libogg = ExternalLibrary.load("ogg")' "libogg = ctypes.CDLL('${libogg}/lib/libogg${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/opus.py --replace \ + 'libopus = ExternalLibrary.load("opus")' "libopus = ctypes.CDLL('${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}')" + substituteInPlace pyogg/opus.py --replace \ + 'libopusfile = ExternalLibrary.load("opusfile")' "libopusfile = ctypes.CDLL('${opusfile}/lib/libopusfile${stdenv.hostPlatform.extensions.sharedLibrary}')" + ''; + + meta = { + description = "Xiph.org's Ogg Vorbis, Opus and FLAC for Python"; + homepage = https://github.com/Zuzu-Typ/PyOgg; + license = lib.licenses.publicDomain; + maintainers = with lib.maintainers; [ pmiddend ]; + }; +} |