summary refs log tree commit diff
path: root/pkgs/development/libraries/libkeyfinder/default.nix
blob: f0e75b340592c452fbabe2da2d8cb0889f298853 (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
{ stdenv, fetchFromGitHub, boost, fftw, qt5 }:

let version = "0.11"; in
stdenv.mkDerivation {
  name = "libkeyfinder-${version}";

  src = fetchFromGitHub {
    sha256 = "0674gykdi1nffvba5rv6fsp0zw02w1gkpn9grh8w983xf13ykbz9";
    rev = "v${version}";
    repo = "libKeyFinder";
    owner = "ibsh";
  };

  meta = with stdenv.lib; {
    inherit version;
    description = "Musical key detection for digital audio (C++ library)";
    homepage = http://www.ibrahimshaath.co.uk/keyfinder/;
    license = licenses.gpl3Plus;
    platforms = with platforms; linux;
    maintainers = with maintainers; [ nckx ];
  };

  buildInputs = [ fftw qt5.base ];
  propagatedBuildInputs = [ boost ];

  patchPhase = ''
    substituteInPlace LibKeyFinder.pro --replace "/usr/local" "$out"
  '';

  configurePhase = ''
    qmake
  '';

  enableParallelBuilding = true;

  postInstall = ''
    mkdir -p $out/include/keyfinder
    cp *.h $out/include/keyfinder
  '';
}