summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ta/talentedhack/package.nix
blob: 1c41f6fc74fbf7a4ea186c280e255f86c7f80e5f (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
{
  lib,
  stdenv,
  fetchFromGitHub,
  lv2,
  fftwFloat,
  pkg-config,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "talentedhack";
  version = "1.86";

  src = fetchFromGitHub {
    owner = "jeremysalwen";
    repo = "talentedhack";
    rev = "v${finalAttrs.version}";
    sha256 = "0kwvayalysmk7y49jq0k16al252md8d45z58hphzsksmyz6148bx";
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    lv2
    fftwFloat
  ];

  # To avoid name clashes, plugins should be compiled with symbols hidden, except for `lv2_descriptor`:
  preConfigure = ''
    sed -r 's/^CFLAGS.*$/\0 -fvisibility=hidden/' -i Makefile
  '';

  installPhase = ''
    d=$out/lib/lv2/talentedhack.lv2
    mkdir -p $d
    cp *.so *.ttl $d
  '';

  meta = {
    homepage = "https://github.com/jeremysalwen/TalentedHack";
    description = "LV2 port of Autotalent pitch correction plugin";
    license = lib.licenses.gpl3;
    maintainers = [ lib.maintainers.michalrus ];
    platforms = lib.platforms.linux;
  };
})