summary refs log tree commit diff
path: root/pkgs/tools/audio/acoustid-fingerprinter/default.nix
blob: e2824bc07b664fce5cbbd1b4f317d7c01074aeb6 (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
{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, qt4, taglib, chromaprint, ffmpeg }:

stdenv.mkDerivation rec {
  pname = "acoustid-fingerprinter";
  version = "0.6";

  src = fetchurl {
    url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/downloads/"
        + "${pname}-${version}.tar.gz";
    sha256 = "0ckglwy95qgqvl2l6yd8ilwpd6qs7yzmj8g7lnxb50d12115s5n0";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ cmake qt4 taglib chromaprint ffmpeg ];

  cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${stdenv.lib.getVersion taglib}" ];

  patches = [
    (fetchpatch {
      url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw";
      sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk";
    })
    ./ffmpeg.patch
  ];

  meta = with stdenv.lib; {
    homepage = "https://acoustid.org/fingerprinter";
    description = "Audio fingerprinting tool using chromaprint";
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = with maintainers; [ ehmry ];
    platforms = with platforms; linux;
  };
}