1{ lib, stdenv, fetchurl, expat, curl, fftw }:
2
3stdenv.mkDerivation rec {
4 pname = "libofa";
5 version = "0.9.3";
6 deb_patch = "5";
7
8 src = fetchurl {
9 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/musicip-libofa/${pname}-${version}.tar.gz";
10 sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2";
11 };
12
13 patches = fetchurl {
14 url = "mirror://debian/pool/main/libo/libofa/libofa_${version}-${deb_patch}.debian.tar.gz";
15 sha256 = "1rfkyz13cm8izm90c1xflp4rvsa24aqs6qpbbbqqcbmvzsj6j9yn";
16 };
17
18 outputs = [ "out" "dev" ];
19
20 setOutputFlags = false;
21
22 preConfigure = ''
23 configureFlagsArray=(--includedir=$dev/include --libdir=$out/lib)
24 '';
25
26 propagatedBuildInputs = [ expat curl fftw ];
27
28 meta = with lib; {
29 homepage = "https://code.google.com/archive/p/musicip-libofa/";
30 description = "Library Open Fingerprint Architecture";
31 longDescription = ''
32 LibOFA (Library Open Fingerprint Architecture) is an open-source audio
33 fingerprint created and provided by MusicIP'';
34 platforms = platforms.linux;
35 license = licenses.gpl2;
36 };
37}