1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 faust2jaqt,
7 faust2lv2,
8}:
9stdenv.mkDerivation rec {
10 pname = "MBdistortion";
11 version = "1.1.1";
12
13 src = fetchFromGitHub {
14 owner = "magnetophon";
15 repo = "MBdistortion";
16 rev = "V${version}";
17 sha256 = "0mdzaqmxzgspfgx9w1hdip18y17hwpdcgjyq1rrfm843vkascwip";
18 };
19
20 patches = [
21 (fetchpatch {
22 url = "https://github.com/magnetophon/MBdistortion/commit/10e35084b88c559f1b63760cf40fd5ef5a6745a5.patch";
23 sha256 = "0hwjl3rzvn3id0sr0qs8f37jdmr915mdan8miaf78ra0ir3wnk76";
24 })
25 ];
26
27 buildInputs = [
28 faust2jaqt
29 faust2lv2
30 ];
31
32 dontWrapQtApps = true;
33
34 buildPhase = ''
35 faust2jaqt -time -vec -t 99999 MBdistortion.dsp
36 faust2lv2 -time -vec -gui -t 99999 MBdistortion.dsp
37 '';
38
39 installPhase = ''
40 mkdir -p $out/bin
41 for f in $(find . -executable -type f); do
42 cp $f $out/bin/
43 done
44 mkdir -p $out/lib/lv2
45 cp -r MBdistortion.lv2/ $out/lib/lv2
46 '';
47
48 meta = {
49 description = "Mid-side multiband distortion for jack and lv2";
50 homepage = "https://github.com/magnetophon/MBdistortion";
51 license = lib.licenses.gpl2;
52 maintainers = [ lib.maintainers.magnetophon ];
53 };
54}