@@ -0,0 +1,41 @@
1+{ stdenv, fetchurl }:
2+let
3+ arch_table = {
4+ "x86_64-linux" = "linux-x86_64";
5+ "i686-linux" = "linux-i686";
6+ };
7+
8+ sha_table = {
9+ "x86_64-linux" =
10+ "d9902aadac4f442992877945da2a6fe8d6ea6b0de314ca8ac0c28dc5f253f7d8";
11+ "i686-linux" =
12+ "46deb0a053b4910c4e68737a7b6556ff5360260c8f86652f91a0130445f5c949";
13+ };
14+
15+ arch = arch_table.${stdenv.system};
16+ sha = sha_table.${stdenv.system};
17+in stdenv.mkDerivation rec {
18+ pname = "essentia-extractor";
19+ version = "2.1_beta2";
20+
21+ src = fetchurl {
22+ url =
23+ "ftp://ftp.acousticbrainz.org/pub/acousticbrainz/essentia-extractor-v${version}-${arch}.tar.gz";
24+ sha256 = sha;
25+ };
26+
27+ unpackPhase = "unpackFile $src ; export sourceRoot=.";
28+
29+ installPhase = ''
30+ mkdir -p $out/bin
31+ cp streaming_extractor_music $out/bin
32+ '';
33+
34+ meta = with stdenv.lib; {
35+ homepage = "https://acousticbrainz.org/download";
36+ description = "AcousticBrainz audio feature extractor";
37+ license = licenses.agpl3Plus;
38+ maintainers = with maintainers; [ lovesegfault ];
39+ platforms = [ "x86_64-linux" "i686-linux" ];
40+ };
41+}