1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, pythonAtLeast
5, pythonOlder
6, paver
7, python
8, isPyPy
9, six
10, pathlib
11, python_magic
12, lib
13}:
14
15buildPythonPackage rec {
16 version = "0.8.10";
17 pname = "eyeD3";
18 disabled = isPyPy;
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "1jb22n1jczxgbpcnfiw12r8dcs74556g1d09mzms44f52kgs7lgc";
23 };
24
25 # https://github.com/nicfit/eyeD3/pull/284
26 postPatch = lib.optionalString (pythonAtLeast "3.4") ''
27 sed -ie '/pathlib/d' requirements/requirements.yml
28 '';
29
30 buildInputs = [ paver ];
31
32 # requires special test data:
33 # https://github.com/nicfit/eyeD3/blob/103198e265e3279384f35304e8218be6717c2976/Makefile#L97
34 doCheck = false;
35
36 propagatedBuildInputs = [ six python_magic ] ++ lib.optional (pythonOlder "3.4") pathlib;
37
38 postInstall = ''
39 for prog in "$out/bin/"*; do
40 wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH" \
41 --prefix PATH : ${python}/bin
42 done
43 '';
44
45 meta = with stdenv.lib; {
46 description = "A Python module and command line program for processing ID3 tags";
47 homepage = http://eyed3.nicfit.net/;
48 license = licenses.gpl2;
49 maintainers = with maintainers; [ lovek323 ];
50 platforms = platforms.unix;
51 longDescription = ''
52 eyeD3 is a Python module and command line program for processing ID3
53 tags. Information about mp3 files (i.e bit rate, sample frequency, play
54 time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
55 and v2.3/v2.4.
56 '';
57 };
58
59}