summary refs log tree commit diff
path: root/pkgs/applications/audio/xtuner/default.nix
blob: 1fdb97f6dad4675d7f0b93201303fbd3a9e0c4de (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
41
42
43
44
45
46
47
48
49
50
51
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, cairo
, libX11
, libjack2
, liblo
, libsigcxx
, zita-resampler
, fftwFloat
}:

stdenv.mkDerivation rec {
  pname = "xtuner";
  version = "1.0";

  src = fetchFromGitHub {
    owner = "brummer10";
    repo = "XTuner";
    rev = "v${version}";
    sha256 = "1i5chfnf3hcivwzni9z6cn9pb68qmwsx8bf4z7d29a5vig8kbhrv";
    fetchSubmodules = true;
  };

  patches = [
    # Fix build against glibc-2.38.
    (fetchpatch {
      name = "glibc-2.38.patch";
      url = "https://github.com/brummer10/libxputty/commit/7eb70bf3f7bce0af9e1919d6c875cdb8efca734e.patch";
      hash = "sha256-VspR0KJjBt4WOrnlo7rHw1oAYM1d2RSz6JhuAEfsO3M=";
      stripLen = 1;
      extraPrefix = "libxputty/";
    })
  ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ cairo libX11 libjack2 liblo libsigcxx zita-resampler fftwFloat ];

  makeFlags = [ "PREFIX=$(out)" ];

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "https://github.com/brummer10/XTuner";
    description = "Tuner for Jack Audio Connection Kit";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ magnetophon ];
    platforms = platforms.linux;
  };
}