1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 kaa-base,
6 isPyPy,
7 isPy3k,
8 python,
9 pkgs,
10}:
11
12buildPythonPackage rec {
13 version = "0.7.8dev-r4569-20111003";
14 format = "setuptools";
15 pname = "kaa-metadata";
16 disabled = isPyPy || isPy3k;
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "0bkbzfgxvmby8lvzkqjp86anxvv3vjd9nksv2g4l7shsk1n7y27a";
21 };
22
23 doCheck = false;
24
25 buildInputs = [ pkgs.libdvdread ];
26
27 propagatedBuildInputs = [ kaa-base ];
28
29 # Same as in buildPythonPackage except that it does not pass --old-and-unmanageable
30 installPhase = ''
31 runHook preInstall
32
33 mkdir -p "$out/${python.sitePackages}"
34
35 export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
36
37 ${python}/bin/${python.executable} setup.py install \
38 --install-lib=$out/${python.sitePackages} \
39 --prefix="$out"
40
41 eapth="$out/${python.sitePackages}/easy-install.pth"
42 if [ -e "$eapth" ]; then
43 mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
44 fi
45
46 rm -f "$out/${python.sitePackages}"/site.py*
47
48 runHook postInstall
49 '';
50
51 meta = with lib; {
52 description = "Python library for parsing media metadata, which can extract metadata (e.g., such as id3 tags) from a wide range of media files";
53 homepage = "https://github.com/freevo/kaa-metadata";
54 license = licenses.gpl2;
55 maintainers = [ ];
56 };
57}