about summary refs log tree commit diff
path: root/pkgs/development/python-modules/kaa-metadata/default.nix
blob: bb8fe831c2b912680fe800c2361618dfb05c29c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
  lib,
  buildPythonPackage,
  fetchPypi,
  kaa-base,
  isPyPy,
  isPy3k,
  python,
  pkgs,
}:

buildPythonPackage rec {
  version = "0.7.8dev-r4569-20111003";
  format = "setuptools";
  pname = "kaa-metadata";
  disabled = isPyPy || isPy3k;

  src = fetchPypi {
    inherit pname version;
    sha256 = "0bkbzfgxvmby8lvzkqjp86anxvv3vjd9nksv2g4l7shsk1n7y27a";
  };

  doCheck = false;

  buildInputs = [ pkgs.libdvdread ];

  propagatedBuildInputs = [ kaa-base ];

  # Same as in buildPythonPackage except that it does not pass --old-and-unmanageable
  installPhase = ''
    runHook preInstall

    mkdir -p "$out/${python.sitePackages}"

    export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"

    ${python}/bin/${python.executable} setup.py install \
      --install-lib=$out/${python.sitePackages} \
      --prefix="$out"

    eapth="$out/${python.sitePackages}/easy-install.pth"
    if [ -e "$eapth" ]; then
    mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
    fi

    rm -f "$out/${python.sitePackages}"/site.py*

    runHook postInstall
  '';

  meta = with lib; {
    description = "Python library for parsing media metadata, which can extract metadata (e.g., such as id3 tags) from a wide range of media files";
    homepage = "https://github.com/freevo/kaa-metadata";
    license = licenses.gpl2;
    maintainers = [ ];
  };
}