13 stdenv.mkDerivation rec {
14 pname = "chromaprint";
18 url = "https://github.com/acoustid/chromaprint/releases/download/v${version}/${pname}-${version}.tar.gz";
19 sha256 = "sha256-oarY+juLGLeNN1Wzdn+v+au2ckLgG0eOyaZOGQ8zXhw=";
24 # https://github.com/acoustid/chromaprint/pull/120
26 url = "https://github.com/acoustid/chromaprint/commit/8ccad6937177b1b92e40ab8f4447ea27bac009a7.patch";
27 hash = "sha256-yO2iWmU9s2p0uJfwIdmk3jZ5HXBIQZ/NyOqG+Y5EHdg=";
28 excludes = [ "package/build.sh" ];
30 # ffmpeg5 fix for issue #122
31 # https://github.com/acoustid/chromaprint/pull/125
33 url = "https://github.com/acoustid/chromaprint/commit/aa67c95b9e486884a6d3ee8b0c91207d8c2b0551.patch";
34 hash = "sha256-dLY8FBzBqJehAofE924ayZK0HA/aKiuFhEFxL7dg6rY=";
38 url = "https://gitlab.archlinux.org/archlinux/packaging/packages/chromaprint/-/raw/74ae4c7faea2114f2d70a57755f714e348476d28/ffmpeg-7.patch";
39 hash = "sha256-io+dzhDNlz+2hWhNfsyePKLQjiUvSzbv10lHVKumTEk=";
43 nativeBuildInputs = [ cmake ninja ];
45 buildInputs = [ ffmpeg ] ++ lib.optionals stdenv.hostPlatform.isDarwin
46 (with darwin.apple_sdk.frameworks; [ Accelerate CoreGraphics CoreVideo zlib ]);
48 cmakeFlags = [ "-DBUILD_EXAMPLES=ON" "-DBUILD_TOOLS=ON" ];
51 homepage = "https://acoustid.org/chromaprint";
52 description = "AcoustID audio fingerprinting library";
53 mainProgram = "fpcalc";
54 license = licenses.lgpl21Plus;
55 platforms = platforms.unix;