aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/audio/talentedhack/default.nix
blob: b30cf59f7b30ed26ef07eb86282388f9e465f6ca (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
{ stdenv, fetchFromGitHub, lv2, fftwFloat, pkgconfig }:

stdenv.mkDerivation rec {
  pname = "talentedhack";
  version = "1.86";

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

  nativeBuildInputs = [ pkgconfig ];

  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 = with stdenv.lib; {
    homepage = "https://github.com/jeremysalwen/TalentedHack";
    description = "LV2 port of Autotalent pitch correction plugin";
    license = licenses.gpl3;
    maintainers = [ maintainers.michalrus ];
    platforms = platforms.linux;
  };
}