at master 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pkg-config, 7 libmpg123, 8 lame, 9 twolame, 10 libopus, 11 opusfile, 12 libvorbis, 13 libcdio, 14 libcdio-paranoia, 15}: 16 17buildPythonPackage { 18 pname = "audiotools"; 19 version = "3.1.1-unstable-2020-07-29"; 20 pyproject = true; 21 22 build-system = [ 23 setuptools 24 ]; 25 26 nativeBuildInputs = [ 27 pkg-config 28 ]; 29 30 buildInputs = [ 31 libmpg123 # MP2/MP3 decoding 32 lame # MP3 encoding 33 twolame # MP2 encoding 34 opusfile # opus decoding 35 libopus # opus encoding 36 libvorbis # ogg encoding/decoding 37 libcdio # CD reading 38 libcdio-paranoia # CD reading 39 ]; 40 41 preConfigure = '' 42 # need to change probe to yes because mp3lame is not reported in pkg-config 43 substituteInPlace setup.cfg \ 44 --replace-fail "mp3lame: probe" "mp3lame: yes" 45 ''; 46 47 # the python code contains #variant formats, PY_SSIZE_T_CLEAN must be defined 48 # before including Python.h for 3.10 or newer 49 # the last released version does not contain the required fix for python 3.10 50 src = fetchFromGitHub { 51 owner = "tuffy"; 52 repo = "python-audio-tools"; 53 rev = "de55488dc982e3f6375cde2d0c2ea6aad1b1c31c"; 54 hash = "sha256-iRakeV4Sg4oU0JtiA0O3jnmLJt99d89Hg6v9onUaSnw="; 55 }; 56 57 meta = with lib; { 58 description = "Utilities and Python modules for handling audio"; 59 homepage = "https://audiotools.sourceforge.net/"; 60 license = licenses.gpl2Plus; 61 maintainers = [ ]; 62 }; 63}