Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, fftw, catch2 }:
2
3stdenv.mkDerivation rec {
4 pname = "libkeyfinder";
5 version = "2.2.6";
6
7 src = fetchFromGitHub {
8 owner = "mixxxdj";
9 repo = "libkeyfinder";
10 rev = "v${version}";
11 sha256 = "sha256-7w/Wc9ncLinbnM2q3yv5DBtFoJFAM2e9xAUTsqvE9mg=";
12 };
13
14 # in main post 2.2.6, see https://github.com/mixxxdj/libkeyfinder/issues/21
15 patches = [
16 (fetchpatch {
17 name = "fix-pkg-config";
18 url = "https://github.com/mixxxdj/libkeyfinder/commit/4e1a5022d4c91e3ecfe9be5c3ac7cc488093bd2e.patch";
19 sha256 = "08llmgp6r11bq5s820j3fs9bgriaibkhq8r3v2av064w66mwp48x";
20 })
21 ];
22
23 nativeBuildInputs = [ cmake ];
24
25 buildInputs = [ fftw ];
26
27 nativeCheckInputs = [ catch2 ];
28
29 doCheck = true;
30
31 meta = with lib; {
32 description = "Musical key detection for digital audio (C++ library)";
33 homepage = "https://mixxxdj.github.io/libkeyfinder/";
34 license = licenses.gpl3Plus;
35 platforms = platforms.unix;
36 };
37}