2018-10-15 20:34:55 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2018-11-18 00:14:18 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
2018-10-15 20:34:55 +01:00
|
|
|
, paver
|
|
|
|
, python
|
|
|
|
, isPyPy
|
2018-11-18 00:14:18 +00:00
|
|
|
, six
|
|
|
|
, pathlib
|
|
|
|
, python_magic
|
|
|
|
, lib
|
2018-10-15 20:34:55 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-04-07 10:41:08 +01:00
|
|
|
version = "0.8.10";
|
2018-10-15 20:34:55 +01:00
|
|
|
pname = "eyeD3";
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
2018-11-18 00:14:18 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-04-07 10:41:08 +01:00
|
|
|
sha256 = "1jb22n1jczxgbpcnfiw12r8dcs74556g1d09mzms44f52kgs7lgc";
|
2018-10-15 20:34:55 +01:00
|
|
|
};
|
|
|
|
|
2018-11-18 00:14:18 +00:00
|
|
|
# https://github.com/nicfit/eyeD3/pull/284
|
|
|
|
postPatch = lib.optionalString (pythonAtLeast "3.4") ''
|
|
|
|
sed -ie '/pathlib/d' requirements/requirements.yml
|
|
|
|
'';
|
|
|
|
|
2018-10-15 20:34:55 +01:00
|
|
|
buildInputs = [ paver ];
|
|
|
|
|
2018-11-18 00:14:18 +00:00
|
|
|
# requires special test data:
|
|
|
|
# https://github.com/nicfit/eyeD3/blob/103198e265e3279384f35304e8218be6717c2976/Makefile#L97
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six python_magic ] ++ lib.optional (pythonOlder "3.4") pathlib;
|
|
|
|
|
2018-10-15 20:34:55 +01:00
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out/bin/"*; do
|
|
|
|
wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
--prefix PATH : ${python}/bin
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Python module and command line program for processing ID3 tags";
|
2019-11-16 00:41:23 +00:00
|
|
|
homepage = https://eyed3.nicfit.net/;
|
2018-10-15 20:34:55 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
longDescription = ''
|
|
|
|
eyeD3 is a Python module and command line program for processing ID3
|
|
|
|
tags. Information about mp3 files (i.e bit rate, sample frequency, play
|
|
|
|
time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
|
|
|
|
and v2.3/v2.4.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|