1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 pkg-config,
7 cairo,
8 libX11,
9 libjack2,
10 liblo,
11 libsigcxx,
12 zita-resampler,
13 fftwFloat,
14}:
15
16stdenv.mkDerivation rec {
17 pname = "xtuner";
18 version = "1.0";
19
20 src = fetchFromGitHub {
21 owner = "brummer10";
22 repo = "XTuner";
23 rev = "v${version}";
24 sha256 = "1i5chfnf3hcivwzni9z6cn9pb68qmwsx8bf4z7d29a5vig8kbhrv";
25 fetchSubmodules = true;
26 };
27
28 patches = [
29 # Fix build against glibc-2.38.
30 (fetchpatch {
31 name = "glibc-2.38.patch";
32 url = "https://github.com/brummer10/libxputty/commit/7eb70bf3f7bce0af9e1919d6c875cdb8efca734e.patch";
33 hash = "sha256-VspR0KJjBt4WOrnlo7rHw1oAYM1d2RSz6JhuAEfsO3M=";
34 stripLen = 1;
35 extraPrefix = "libxputty/";
36 })
37 ];
38
39 nativeBuildInputs = [ pkg-config ];
40 buildInputs = [
41 cairo
42 libX11
43 libjack2
44 liblo
45 libsigcxx
46 zita-resampler
47 fftwFloat
48 ];
49
50 makeFlags = [ "PREFIX=$(out)" ];
51
52 enableParallelBuilding = true;
53
54 meta = with lib; {
55 homepage = "https://github.com/brummer10/XTuner";
56 description = "Tuner for Jack Audio Connection Kit";
57 license = licenses.gpl2Plus;
58 maintainers = with maintainers; [ magnetophon ];
59 platforms = platforms.linux;
60 mainProgram = "xtuner";
61 };
62}