1{
2 lib,
3 stdenv,
4 cairo,
5 fetchurl,
6 gst_all_1,
7 jack2,
8 ladspaH,
9 libGL,
10 libGLU,
11 libXrandr,
12 libsndfile,
13 lv2,
14 php82,
15 pkg-config,
16}:
17
18let
19 php = php82;
20in
21
22stdenv.mkDerivation (finalAttrs: {
23 pname = "lsp-plugins";
24 version = "1.2.22";
25
26 outputs = [
27 "out"
28 "dev"
29 "doc"
30 ];
31
32 src = fetchurl {
33 url = "https://github.com/lsp-plugins/lsp-plugins/releases/download/${finalAttrs.version}/lsp-plugins-src-${finalAttrs.version}.tar.gz";
34 hash = "sha256-u5cnBIKwTBJpZDqDc7VUJV3eKHscXdvFZ6yU3kgVp1s=";
35 };
36
37 # By default, GStreamer plugins are installed right alongside GStreamer itself
38 # We can't do that in Nixpkgs, so lets install it to $out/lib like other plugins
39 postPatch = ''
40 substituteInPlace modules/lsp-plugin-fw/src/Makefile \
41 --replace-fail '$(shell pkg-config --variable=pluginsdir gstreamer-1.0)' '$(LIBDIR)/gstreamer-1.0'
42 '';
43
44 nativeBuildInputs = [
45 php
46 pkg-config
47 ];
48
49 buildInputs = [
50 cairo
51 gst_all_1.gst-plugins-base
52 gst_all_1.gstreamer
53 jack2
54 ladspaH
55 libGL
56 libGLU
57 libXrandr
58 libsndfile
59 lv2
60 ];
61
62 makeFlags = [
63 "ETCDIR=${placeholder "out"}/etc"
64 "PREFIX=${placeholder "out"}"
65 "SHAREDDIR=${placeholder "out"}/share"
66 ];
67
68 env.NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL";
69
70 configurePhase = ''
71 runHook preConfigure
72
73 make $makeFlags config
74
75 runHook postConfigure
76 '';
77
78 doCheck = true;
79
80 enableParallelBuilding = true;
81
82 meta = {
83 description = "Collection of open-source audio plugins";
84 longDescription = ''
85 Compatible with the following formats:
86
87 - CLAP - set of plugins for Clever Audio Plugins API
88 - LADSPA - set of plugins for Linux Audio Developer's Simple Plugin API
89 - LV2 - set of plugins and UIs for Linux Audio Developer's Simple Plugin API (LADSPA) version 2
90 - LinuxVST - set of plugins and UIs for Steinberg's VST 2.4 format ported on GNU/Linux Platform
91 - JACK - Standalone versions for JACK Audio connection Kit with UI
92
93 Contains the following plugins (https://lsp-plug.in/?page=plugins)
94
95 Equalizers:
96 - Fliter
97 - Graphic Equalizer
98 - Parametric Equalizer
99 Dynamic Processing:
100 - Compressor
101 - Dynamic Processor
102 - Expander
103 - Gate
104 - Limiter
105 Multiband Dynamic Processing:
106 - GOTT Compressor
107 - Multiband Compressor
108 - Multiband Dynamics Processor
109 - Multiband Expander
110 - Multiband Gate
111 - Multiband Limiter
112 Convolution / Reverb processing:
113 - Impulse Responses
114 - Impulse Reverb
115 - Room Builder
116 Delay Effects:
117 - Artistic Delay
118 - Compensation Delay
119 - Slap-back Delay
120 Analyzers:
121 - Oscilloscope
122 - Phase Detector
123 - Spectrum Analyzer
124 Multiband Processing:
125 - Crossover
126 Samplers:
127 - Multisampler
128 - Sampler
129 Generators / Oscillators:
130 - Noise Generator
131 - Oscillator
132 Utilitary Plugins:
133 - A/B Test Plugin
134 - Flanger
135 - Latency Meter
136 - Loudness Compensator
137 - Mixer
138 - Profiler
139 - Surge Filter
140 - Trigger
141 '';
142 homepage = "https://lsp-plug.in";
143 changelog = "https://github.com/lsp-plugins/lsp-plugins/releases/tag/${finalAttrs.version}";
144 maintainers = with lib.maintainers; [
145 magnetophon
146 PowerUser64
147 ];
148 license = lib.licenses.gpl2;
149 platforms = lib.platforms.linux;
150 };
151})