aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/gearmulator/default.nix
blob: 84687db7d5b2e7a20c11889c1e11f535ffc1abf1 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
  alsa-lib,
  cmake,
  fetchFromGitHub,
  fontconfig,
  freetype,
  lib,
  libjack2,
  libX11,
  libXcursor,
  libXext,
  libXinerama,
  libXrandr,
  lv2,
  pkg-config,
  stdenv
}:

stdenv.mkDerivation rec {
  pname = "gearmulator";
  version = "1.4.1";

  src = fetchFromGitHub {
    owner = "dsp56300";
    repo = pname;
    tag = version;
    hash = "sha256-JnXTTtxF5jHPaU+d558JwlGo/QjKHtVuCqel5iaBBCk=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    alsa-lib
    fontconfig
    freetype
    libjack2
    libX11
    libXcursor
    libXext
    libXinerama
    libXrandr
    lv2
  ];

  NIX_LDFLAGS = (
    toString [
      "-lX11"
      "-lXcursor"
      "-lXext"
      "-lXinerama"
      "-lXrandr"
    ]
  );

  cmakeFlags = [
    "-Dgearmulator_BUILD_FX_PLUGIN=OFF"
    "-Dgearmulator_BUILD_JUCEPLUGIN=ON"
    "-Dgearmulator_BUILD_JUCEPLUGIN_CLAP=OFF"
    "-Dgearmulator_BUILD_JUCEPLUGIN_LV2=OFF"
    "-Dgearmulator_SYNTH_NODALRED2X=ON"
    "-Dgearmulator_SYNTH_OSIRUS=OFF"
    "-Dgearmulator_SYNTH_OSTIRUS=ON"
    "-Dgearmulator_SYNTH_VAVRA=OFF"
    "-Dgearmulator_SYNTH_XENIA=OFF"
  ];

  #installPhase = ''
  #  mkdir -p $out/lib/vst{,3}
  #  cp $sourceRoot/bin/plugins/Release/VST/lib{NodalRed2x,OsTIrus}.so $out/lib/vst
  #  cp -r $sourceRoot/bin/plugins/Release/VST3/{NodalRed2x,OsTIrus}.vst3 $out/lib/vst3
  #'';

  meta = {
    description = "Emulation of Motorola 56300 family DSP synths";
    homepage = "https://github.com/dsp56300/gearmulator";
    license = lib.licenses.gpl3;
    platforms = [ "x86_64-linux" ];
  };
}