about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/meters_lv2/default.nix
blob: d4dbcf210ec917feb28b5a0ea9dac302377f8979 (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
52
53
54
55
56
57
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, lv2
, libGLU
, libGL
, gtk2
, cairo
, pango
, fftwFloat
, libjack2
}:

stdenv.mkDerivation rec {
  pname = "meters.lv2";
  version = "0.9.20";
  robtkVersion = "0.7.5";

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ lv2 libGLU libGL gtk2 cairo pango fftwFloat libjack2 ];

  src = fetchFromGitHub {
    owner = "x42";
    repo = "meters.lv2";
    rev = "v${version}";
    sha256 = "sha256-eGXTbE83bJEDqTBltL6ZX9qa/OotCFmUxpE/aLqGELU=";
  };

  robtkSrc = fetchFromGitHub {
    owner = "x42";
    repo = "robtk";
    rev = "v${robtkVersion}";
    sha256 = "sha256-L1meipOco8esZl+Pgqgi/oYVbhimgh9n8p9Iqj3dZr0=";
  };

  postUnpack = ''
    rm -rf $sourceRoot/robtk/
    ln -s ${robtkSrc} $sourceRoot/robtk
  '';

  postPatch = ''
    substituteInPlace Makefile --replace "-msse -msse2 -mfpmath=sse" ""
  ''; # remove x86-specific flags

  meter_VERSION = version;
  enableParallelBuilding = true;
  makeFlags = [ "PREFIX=${placeholder "out"}" ];

  meta = with lib; {
    description = "Collection of audio level meters with GUI in LV2 plugin format";
    mainProgram = "x42-meter";
    homepage = "https://x42.github.io/meters.lv2/";
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}