about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyacoustid/default.nix
blob: 24dc34c47f53394f542cd0ee9ca70dbce13ab8aa (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  requests,
  audioread,
  pkgs,
}:

buildPythonPackage rec {
  pname = "pyacoustid";
  version = "1.3.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-X09IcZHBnruQgnCxt7UpfxMtozKxVouWqRRXTAee0Xc=";
  };

  propagatedBuildInputs = [
    requests
    audioread
  ];

  postPatch = ''
    sed -i \
        -e '/^FPCALC_COMMAND *=/s|=.*|= "${pkgs.chromaprint}/bin/fpcalc"|' \
        acoustid.py
  '';

  # package has no tests
  doCheck = false;

  pythonImportsCheck = [ "acoustid" ];

  meta = with lib; {
    description = "Bindings for Chromaprint acoustic fingerprinting";
    homepage = "https://github.com/sampsyo/pyacoustid";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}