1{
2 lib,
3 stdenv,
4 fetchurl,
5 fftwFloat,
6 gtk2,
7 ladspaPlugins,
8 libjack2,
9 liblo,
10 libxml2,
11 makeWrapper,
12 pkg-config,
13 perlPackages,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 version = "0.95.0";
18 pname = "jamin";
19
20 src = fetchurl {
21 url = "mirror://sourceforge/jamin/jamin-${finalAttrs.version}.tar.gz";
22 hash = "sha256-di/uiGgvJ4iORt+wE6mrXnmFM7m2dkP/HXdgUBk5uzw=";
23 };
24
25 nativeBuildInputs = [
26 pkg-config
27 makeWrapper
28 ];
29
30 buildInputs = [
31 fftwFloat
32 gtk2
33 ladspaPlugins
34 libjack2
35 liblo
36 libxml2
37 ]
38 ++ (with perlPackages; [
39 perl
40 XMLParser
41 ]);
42
43 # Workaround build failure on -fno-common toolchains like upstream
44 # gcc-10. Otherwise build fails as:
45 # ld: jamin-preferences.o:/build/jamin-0.95.0/src/hdeq.h:64: multiple definition of
46 # `l_notebook1'; jamin-callbacks.o:/build/jamin-0.95.0/src/hdeq.h:64: first defined here
47 # `incompatible-pointer-types` fixes build on GCC 14, otherwise fails with:
48 # error: passing argument 4 of 'lo_server_thread_add_method' from incompatible pointer type
49 env.NIX_CFLAGS_COMPILE = "-fcommon -Wno-error=incompatible-pointer-types";
50
51 postInstall = ''
52 wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa
53 '';
54
55 meta = {
56 homepage = "https://jamin.sourceforge.net";
57 description = "JACK Audio Mastering interface";
58 license = lib.licenses.gpl2;
59 maintainers = [ lib.maintainers.nico202 ];
60 platforms = lib.platforms.linux;
61 };
62})