From 6b6c22f59bf570f5e367250553db4ea8f20649d0 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Sun, 3 Aug 2025 13:50:38 +0200 Subject: [PATCH 01/12] changed webkitgtk to webkitgtk_4_1 --- bitwig/bitwig-studio-5.1.nix | 2 +- bitwig/bitwig-studio-5.2.nix | 2 +- bitwig/bitwig-studio-5.3-beta.nix | 2 +- bitwig/bitwig-studio-5.3.nix | 2 +- chow/chow-kick.nix | 4 ++-- chow/chow-multitool.nix | 4 ++-- chow/chow-tape-model.nix | 4 ++-- devshell/juce.nix | 4 ++-- templates/juce-plugin.nix | 4 ++-- vst/grainbow/default.nix | 4 ++-- vst/neuralnote/neuralnote.nix | 4 ++-- vst/papu.nix | 4 ++-- vst/paulxstretch.nix | 4 ++-- vst/plugdata.nix | 4 ++-- vst/ripplerx.nix | 4 ++-- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bitwig/bitwig-studio-5.1.nix b/bitwig/bitwig-studio-5.1.nix index bfaaed4..bbdb51c 100644 --- a/bitwig/bitwig-studio-5.1.nix +++ b/bitwig/bitwig-studio-5.1.nix @@ -24,7 +24,7 @@ , xorg , zlib -, webkitgtk +, webkitgtk_4_1 , curl , fftwFloat , jack2 diff --git a/bitwig/bitwig-studio-5.2.nix b/bitwig/bitwig-studio-5.2.nix index 9d37fd8..8b7f839 100644 --- a/bitwig/bitwig-studio-5.2.nix +++ b/bitwig/bitwig-studio-5.2.nix @@ -2,7 +2,7 @@ , glib, gtk3, harfbuzz, lib, libglvnd, libjack2, libjpeg, libxkbcommon , makeWrapper, pango, pipewire, pulseaudio, wrapGAppsHook, xdg-utils, xorg, zlib -, webkitgtk, curl, fftwFloat, jack2, vulkan-loader }: +, webkitgtk_4_1, curl, fftwFloat, jack2, vulkan-loader }: stdenv.mkDerivation rec { pname = "bitwig-studio"; diff --git a/bitwig/bitwig-studio-5.3-beta.nix b/bitwig/bitwig-studio-5.3-beta.nix index 05e4fa3..677f9f3 100644 --- a/bitwig/bitwig-studio-5.3-beta.nix +++ b/bitwig/bitwig-studio-5.3-beta.nix @@ -2,7 +2,7 @@ , glib, gtk3, harfbuzz, lib, libglvnd, libjack2, libjpeg, libxkbcommon , makeWrapper, pango, pipewire, pulseaudio, wrapGAppsHook, xdg-utils, xorg, zlib -, webkitgtk, curl, fftwFloat, jack2, vulkan-loader }: +, webkitgtk_4_1, curl, fftwFloat, jack2, vulkan-loader }: stdenv.mkDerivation rec { pname = "bitwig-studio"; diff --git a/bitwig/bitwig-studio-5.3.nix b/bitwig/bitwig-studio-5.3.nix index f0744e3..3cacad6 100644 --- a/bitwig/bitwig-studio-5.3.nix +++ b/bitwig/bitwig-studio-5.3.nix @@ -2,7 +2,7 @@ , glib, gtk3, harfbuzz, lib, libglvnd, libjack2, libjpeg, libxkbcommon , makeWrapper, pango, pipewire, pulseaudio, wrapGAppsHook, xdg-utils, xorg, zlib -, webkitgtk, curl, fftwFloat, jack2, vulkan-loader }: +, webkitgtk_4_1, curl, fftwFloat, jack2, vulkan-loader }: stdenv.mkDerivation rec { pname = "bitwig-studio"; diff --git a/chow/chow-kick.nix b/chow/chow-kick.nix index 3c4b480..ba56568 100644 --- a/chow/chow-kick.nix +++ b/chow/chow-kick.nix @@ -33,7 +33,7 @@ , sqlite , stdenv , util-linuxMinimal -, webkitgtk +, webkitgtk_4_1 }: stdenv.mkDerivation rec { @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { python3 sqlite util-linuxMinimal - webkitgtk + webkitgtk_4_1 ]; cmakeFlags = [ diff --git a/chow/chow-multitool.nix b/chow/chow-multitool.nix index 18e9607..e69888c 100644 --- a/chow/chow-multitool.nix +++ b/chow/chow-multitool.nix @@ -26,7 +26,7 @@ , pcre2 , pkg-config , sqlite -, webkitgtk +, webkitgtk_4_1 , stdenv }: stdenv.mkDerivation rec { @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { pcre pcre2 sqlite - webkitgtk + webkitgtk_4_1 ]; cmakeFlags = [ diff --git a/chow/chow-tape-model.nix b/chow/chow-tape-model.nix index fa6f94d..e705f5e 100644 --- a/chow/chow-tape-model.nix +++ b/chow/chow-tape-model.nix @@ -33,7 +33,7 @@ , python3 , sqlite , gcc11Stdenv -, webkitgtk +, webkitgtk_4_1 }: let # JUCE version in submodules is incompatible with GCC12 @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { pcre2 python3 sqlite - webkitgtk + webkitgtk_4_1 gcc11 ]; diff --git a/devshell/juce.nix b/devshell/juce.nix index f2d5bc9..21ed983 100644 --- a/devshell/juce.nix +++ b/devshell/juce.nix @@ -6,7 +6,7 @@ mkShell , freetype , alsa-lib -, webkitgtk +, webkitgtk_4_1 , curl , gtk3 , xorg @@ -32,7 +32,7 @@ mkShell { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl gtk3 jack2 diff --git a/templates/juce-plugin.nix b/templates/juce-plugin.nix index 30f6a71..244a9aa 100644 --- a/templates/juce-plugin.nix +++ b/templates/juce-plugin.nix @@ -6,7 +6,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , xorg , pcre2 @@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl gtk3 jack2 diff --git a/vst/grainbow/default.nix b/vst/grainbow/default.nix index 517a2cd..46a6295 100644 --- a/vst/grainbow/default.nix +++ b/vst/grainbow/default.nix @@ -6,7 +6,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , xorg , pcre2 @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl gtk3 xorg.libX11 diff --git a/vst/neuralnote/neuralnote.nix b/vst/neuralnote/neuralnote.nix index 6a541ed..9a6161e 100644 --- a/vst/neuralnote/neuralnote.nix +++ b/vst/neuralnote/neuralnote.nix @@ -5,7 +5,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , fftwFloat , jack2 @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl fftwFloat jack2 diff --git a/vst/papu.nix b/vst/papu.nix index fbd7f5c..234ad6a 100644 --- a/vst/papu.nix +++ b/vst/papu.nix @@ -5,7 +5,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , xorg , pcre2 @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl gtk3 jack2 diff --git a/vst/paulxstretch.nix b/vst/paulxstretch.nix index 5e18373..d3fb86c 100644 --- a/vst/paulxstretch.nix +++ b/vst/paulxstretch.nix @@ -5,7 +5,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , fftwFloat , jack2 @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl fftwFloat jack2 diff --git a/vst/plugdata.nix b/vst/plugdata.nix index 5460e3f..6ba451e 100644 --- a/vst/plugdata.nix +++ b/vst/plugdata.nix @@ -8,7 +8,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , xorg , python3 @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ alsa-lib freetype - webkitgtk + webkitgtk_4_1 curl xorg.libX11 xorg.xrandr diff --git a/vst/ripplerx.nix b/vst/ripplerx.nix index 41557c0..307de5b 100644 --- a/vst/ripplerx.nix +++ b/vst/ripplerx.nix @@ -5,7 +5,7 @@ , pkg-config , alsa-lib , freetype -, webkitgtk +, webkitgtk_4_1 , curl , xorg , pcre2 @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype alsa-lib - webkitgtk + webkitgtk_4_1 curl gtk3 jack2 From fa34195e585488939760f9226f6e81d31b4cc5c0 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Sun, 3 Aug 2025 15:10:07 +0200 Subject: [PATCH 02/12] add iem plugins --- flake.nix | 1 + vst/iem-plugin-suite.nix | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 vst/iem-plugin-suite.nix diff --git a/flake.nix b/flake.nix index cd49ee9..e0b9ad6 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ vital = pkgs.callPackage ./vst/vital.nix { }; ripplerx = pkgs.callPackage ./vst/ripplerx.nix { }; aida-x = pkgs.callPackage ./vst/aida-x.nix { }; + iem-plugin-suite = pkgs.callPackage ./vst/iem-plugin-suite.nix { }; # Bitwig bitwig-studio4 = pkgs.callPackage ./bitwig/bitwig-studio4.nix { }; diff --git a/vst/iem-plugin-suite.nix b/vst/iem-plugin-suite.nix new file mode 100644 index 0000000..7f478db --- /dev/null +++ b/vst/iem-plugin-suite.nix @@ -0,0 +1,117 @@ +{ lib +, stdenv +, fetchFromGitLab +, cmake +, pkg-config +, alsa-lib +, freetype +, webkitgtk_4_1 +, curl +, jack2 +, xorg +, pcre2 +, pcre +, libuuid +, libselinux +, libsepol +, libthai +, libdatrie +, libxkbcommon +, libepoxy +, libsysprof-capture +, sqlite +, libpsl +}: +let + buildType = "Release"; +in +stdenv.mkDerivation (finalAttrs: { + pname = "iem-plugin-suite"; + version = "1.15.0"; + + src = fetchFromGitLab { + domain = "git.iem.at"; + owner = "audioplugins"; + repo = "IEMPluginSuite"; + rev = "v${finalAttrs.version}"; + sha256 = ""; # You'll need to add the correct hash after first build attempt + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ + freetype + alsa-lib + webkitgtk_4_1 + curl + jack2 + xorg.libX11 + xorg.libXext + xorg.libXinerama + xorg.xrandr + xorg.libXcursor + xorg.libXfixes + xorg.libXrender + xorg.libXScrnSaver + ]; + + # JUCE dlopens these, make sure they are in rpath + # Otherwise, segfault will happen + NIX_LDFLAGS = (toString [ + "-lX11" + "-lXext" + "-lXcursor" + "-lXinerama" + "-lXrandr" + "-lXfixes" + "-lXrender" + "-lXss" + ]); + + # Needed for LTO to work + cmakeFlags = [ + "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar" + "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" + "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm" + "-DCMAKE_BUILD_TYPE=${buildType}" + ]; + + cmakeBuildType = buildType; + + installPhase = let + vst3path = "${placeholder "out"}/lib/vst3"; + vstpath = "${placeholder "out"}/lib/vst"; + binpath = "${placeholder "out"}/bin"; + in + '' + runHook preInstall + + mkdir -p ${vst3path} + mkdir -p ${vstpath} + mkdir -p ${binpath} + + # Install VST3 plugins + find . -name "*.vst3" -type d -exec cp -R {} ${vst3path}/ \; + + # Install VST2 plugins (if built) + find . -name "*.so" -path "*/VST/*" -exec cp {} ${vstpath}/ \; + + # Install standalone applications (if any) + find . -name "*" -type f -executable -not -name "*.so" -not -name "*.vst3" -exec cp {} ${binpath}/ \; 2>/dev/null || true + + runHook postInstall + ''; + + meta = with lib; { + description = "IEM Plugin Suite for production of Ambisonic content"; + longDescription = '' + The IEM Plugin Suite is a comprehensive collection of audio plugins for + Ambisonic and multichannel audio processing, developed by the Institute + of Electronic Music and Acoustics (IEM) in Graz, Austria. + ''; + homepage = "https://git.iem.at/audioplugins/IEMPluginSuite"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ]; # Add your maintainer info here + }; +}) \ No newline at end of file From 0f33040b842f29a1fcb54011d8ee0f4622c2b306 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Sun, 3 Aug 2025 19:50:53 +0200 Subject: [PATCH 03/12] added IEM plugin suite --- vst/iem-plugin-suite.nix | 65 +++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/vst/iem-plugin-suite.nix b/vst/iem-plugin-suite.nix index 7f478db..529be06 100644 --- a/vst/iem-plugin-suite.nix +++ b/vst/iem-plugin-suite.nix @@ -21,6 +21,16 @@ , libsysprof-capture , sqlite , libpsl +, fftw +, fftwFloat +, libGL +, libglvnd +, util-linux +# Configurable build options +, enableStandalone ? true +, enableVST3 ? true +, enableVST2 ? false +, enableLV2 ? false }: let buildType = "Release"; @@ -34,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "audioplugins"; repo = "IEMPluginSuite"; rev = "v${finalAttrs.version}"; - sha256 = ""; # You'll need to add the correct hash after first build attempt + sha256 = "sha256-JYe09sSG6cbwpBF8LEfsHDC+v9RZCr7VW1sgTYHPEO0="; fetchSubmodules = true; }; @@ -53,6 +63,12 @@ stdenv.mkDerivation (finalAttrs: { xorg.libXfixes xorg.libXrender xorg.libXScrnSaver + # Add missing dependencies based on RPM list + fftw + fftwFloat # This provides libfftw3f + libGL + libglvnd + util-linux ]; # JUCE dlopens these, make sure they are in rpath @@ -66,6 +82,9 @@ stdenv.mkDerivation (finalAttrs: { "-lXfixes" "-lXrender" "-lXss" + "-lfftw3f" + "-lfftw3" + "-lGL" ]); # Needed for LTO to work @@ -74,6 +93,11 @@ stdenv.mkDerivation (finalAttrs: { "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm" "-DCMAKE_BUILD_TYPE=${buildType}" + "-DIEM_BUILD_VST2=${if enableVST2 then "ON" else "OFF"}" + "-DIEM_BUILD_VST3=${if enableVST3 then "ON" else "OFF"}" + "-DIEM_BUILD_LV2=${if enableLV2 then "ON" else "OFF"}" + "-DIEM_BUILD_STANDALONE=${if enableStandalone then "ON" else "OFF"}" + "-DIEM_POST_BUILD_INSTALL=NO" # Disable automatic copying ]; cmakeBuildType = buildType; @@ -81,33 +105,46 @@ stdenv.mkDerivation (finalAttrs: { installPhase = let vst3path = "${placeholder "out"}/lib/vst3"; vstpath = "${placeholder "out"}/lib/vst"; + lv2path = "${placeholder "out"}/lib/lv2"; binpath = "${placeholder "out"}/bin"; in '' runHook preInstall - mkdir -p ${vst3path} - mkdir -p ${vstpath} - mkdir -p ${binpath} + ${lib.optionalString enableVST3 "mkdir -p ${vst3path}"} + ${lib.optionalString enableVST2 "mkdir -p ${vstpath}"} + ${lib.optionalString enableLV2 "mkdir -p ${lv2path}"} + ${lib.optionalString enableStandalone "mkdir -p ${binpath}"} - # Install VST3 plugins - find . -name "*.vst3" -type d -exec cp -R {} ${vst3path}/ \; + ${lib.optionalString enableVST3 '' + # Install VST3 plugins + find . -name "*.vst3" -type d -exec cp -R {} ${vst3path}/ \; + ''} - # Install VST2 plugins (if built) - find . -name "*.so" -path "*/VST/*" -exec cp {} ${vstpath}/ \; + ${lib.optionalString enableVST2 '' + # Install VST2 plugins (if built) + find . -name "*.so" -path "*/VST/*" -exec cp {} ${vstpath}/ \; + ''} + + ${lib.optionalString enableLV2 '' + # Install LV2 plugins (if built) + find . -name "*.lv2" -type d -exec cp -R {} ${lv2path}/ \; + ''} - # Install standalone applications (if any) - find . -name "*" -type f -executable -not -name "*.so" -not -name "*.vst3" -exec cp {} ${binpath}/ \; 2>/dev/null || true + ${lib.optionalString enableStandalone '' + # Install standalone applications (if any) + find . -name "*" -type f -executable -not -name "*.so" -not -name "*.vst3" -not -name "*.lv2" -exec cp {} ${binpath}/ \; 2>/dev/null || true + ''} runHook postInstall ''; meta = with lib; { - description = "IEM Plugin Suite for production of Ambisonic content"; + description = "IEM Plugin Suite for Ambisonic production"; longDescription = '' - The IEM Plugin Suite is a comprehensive collection of audio plugins for - Ambisonic and multichannel audio processing, developed by the Institute - of Electronic Music and Acoustics (IEM) in Graz, Austria. + The IEM Plug-in Suite is a free and Open-Source audio plug-in suite + including Ambisonic plug-ins up to 7th order + created by staff and students of the Institute of Electronic Music and Acoustics. ''; homepage = "https://git.iem.at/audioplugins/IEMPluginSuite"; license = licenses.gpl3Plus; From 83991fbf676530de5df203436c1ab59d567b9f57 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Sun, 3 Aug 2025 20:03:29 +0200 Subject: [PATCH 04/12] added iem to overlay --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index e0b9ad6..864034a 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ kmidimon = self.packages.${system}.kmidimon; ripplerx = self.packages.${system}.ripplerx; aida-x = self.packages.${system}.aida-x; + iem-plugin-suite = self.packages.${system}.iem-plugin-suite; }); devShells.${system}.juce = pkgs.callPackage ./devshell/juce.nix { }; From a17161f104f1c5a5ac4ed7a6992f7426c859d21e Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Mon, 4 Aug 2025 09:07:23 +0200 Subject: [PATCH 05/12] added IEM to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8207e84..43a335d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Assorted audio packages for Nix(OS)/Linux. * Audio Assault AmpLocker * A number of CHOW plugins * PAPU +* [IEM Plugin Suite](https://git.iem.at/audioplugins/IEMPluginSuite) * Some other stuff Mostly things I use myself, provided as-is. Please see [here](#non-support) before opening tickets. From a7ebb113ecb0a3b05192c2041262f88da8fb4b30 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Tue, 5 Aug 2025 12:37:51 +0200 Subject: [PATCH 06/12] start mcfx, move iem to ambisonics --- {vst => ambisonics}/iem-plugin-suite.nix | 0 ambisonics/mcfx.nix | 154 +++++++++++++++++++++++ flake.nix | 4 +- 3 files changed, 157 insertions(+), 1 deletion(-) rename {vst => ambisonics}/iem-plugin-suite.nix (100%) create mode 100644 ambisonics/mcfx.nix diff --git a/vst/iem-plugin-suite.nix b/ambisonics/iem-plugin-suite.nix similarity index 100% rename from vst/iem-plugin-suite.nix rename to ambisonics/iem-plugin-suite.nix diff --git a/ambisonics/mcfx.nix b/ambisonics/mcfx.nix new file mode 100644 index 0000000..41fdc72 --- /dev/null +++ b/ambisonics/mcfx.nix @@ -0,0 +1,154 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, alsa-lib +, freetype +, webkitgtk_4_1 +, curl +, jack2 +, xorg +, libGL +, mesa +, fftw +, fftwFloat +, zita-convolver +# Configurable build options +, enableVST2 ? false +, enableVST3 ? true +, enableStandalone ? false +, enableLV2 ? false +, enableZitaConvolver ? true +, numChannels ? 36 +, maxDelayTimeS ? "0.5" +}: +let + buildType = "Release"; +in +stdenv.mkDerivation (finalAttrs: { + pname = "mcfx"; + version = "0.6.10"; + + src = fetchFromGitHub { + owner = "kronihias"; + repo = "mcfx"; + rev = "v${finalAttrs.version}"; + sha256 = ""; # You'll need to add the correct hash after first build attempt + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ + alsa-lib + freetype + webkitgtk_4_1 + curl + jack2 + xorg.libX11 + xorg.libXcomposite + xorg.libXcursor + xorg.libXext + xorg.libXinerama + xorg.xrandr + xorg.libXrender + libGL + mesa + fftw + fftwFloat + ] ++ lib.optionals enableZitaConvolver [ + zita-convolver + ]; + + # JUCE dlopens these, make sure they are in rpath + NIX_LDFLAGS = (toString [ + "-lX11" + "-lXext" + "-lXcursor" + "-lXinerama" + "-lXrandr" + "-lXrender" + "-lXcomposite" + "-lGL" + "-lfftw3f" + ] ++ lib.optionals enableZitaConvolver [ + "-lzita-convolver" + ]); + + cmakeFlags = [ + "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar" + "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" + "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm" + "-DCMAKE_BUILD_TYPE=${buildType}" + "-DBUILD_VST=${if enableVST2 then "TRUE" else "FALSE"}" + "-DBUILD_VST3=${if enableVST3 then "TRUE" else "FALSE"}" + "-DBUILD_LV2=${if enableLV2 then "TRUE" else "FALSE"}" + "-DBUILD_STANDALONE=${if enableStandalone then "TRUE" else "FALSE"}" + "-DNUM_CHANNELS=${toString numChannels}" + "-DMAX_DELAYTIME_S=${maxDelayTimeS}" + "-DJUCE_JACK=${if enableStandalone then "TRUE" else "FALSE"}" + "-DJUCE_ALSA=${if enableStandalone then "TRUE" else "FALSE"}" + ] ++ lib.optionals (stdenv.isLinux && enableZitaConvolver) [ + "-DWITH_ZITA_CONVOLVER=TRUE" + ]; + + cmakeBuildType = buildType; + + # Patch JUCE Jack implementation as per CMakeLists.txt + postPatch = lib.optionalString enableStandalone '' + if [ -f JUCE_patches/juce_linux_JackAudio.cpp.patch ]; then + patch -p0 JUCE/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp < JUCE_patches/juce_linux_JackAudio.cpp.patch || true + fi + ''; + + installPhase = let + vst3path = "${placeholder "out"}/lib/vst3"; + vstpath = "${placeholder "out"}/lib/vst"; + lv2path = "${placeholder "out"}/lib/lv2"; + binpath = "${placeholder "out"}/bin"; + in + '' + runHook preInstall + + ${lib.optionalString enableVST3 "mkdir -p ${vst3path}"} + ${lib.optionalString enableVST2 "mkdir -p ${vstpath}"} + ${lib.optionalString enableLV2 "mkdir -p ${lv2path}"} + ${lib.optionalString enableStandalone "mkdir -p ${binpath}"} + + ${lib.optionalString enableVST3 '' + # Install VST3 plugins + find . -name "*.vst3" -type d -exec cp -R {} ${vst3path}/ \; + ''} + + ${lib.optionalString enableVST2 '' + # Install VST2 plugins + find . -name "*.so" -path "*/vst/*" -exec cp {} ${vstpath}/ \; + ''} + + ${lib.optionalString enableLV2 '' + # Install LV2 plugins + find . -name "*.lv2" -type d -exec cp -R {} ${lv2path}/ \; + ''} + + ${lib.optionalString enableStandalone '' + # Install standalone applications + find . -name "*" -type f -executable -not -name "*.so" -not -path "*.vst3/*" -not -path "*.lv2/*" -exec cp {} ${binpath}/ \; 2>/dev/null || true + ''} + + runHook postInstall + ''; + + meta = with lib; { + description = "Multichannel Audio Plug-in Suite for Ambisonic production"; + longDescription = '' + mcfx is a suite of multichannel audio plug-ins, made for + production of Ambisonic content. The plug-ins are available + as VST, VST3, LV2 and standalone applications for OSX, Windows and Linux. + ''; + homepage = "https://github.com/kronihias/mcfx"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ]; # Add your maintainer info here + }; +}) \ No newline at end of file diff --git a/flake.nix b/flake.nix index 864034a..1afd5bb 100644 --- a/flake.nix +++ b/flake.nix @@ -26,7 +26,8 @@ vital = pkgs.callPackage ./vst/vital.nix { }; ripplerx = pkgs.callPackage ./vst/ripplerx.nix { }; aida-x = pkgs.callPackage ./vst/aida-x.nix { }; - iem-plugin-suite = pkgs.callPackage ./vst/iem-plugin-suite.nix { }; + iem-plugin-suite = pkgs.callPackage ./vst/ambisonics/iem-plugin-suite.nix { }; + mcfx = pkgs.callPackage ./vst/ambisonics/mcfx.nix { }; # Bitwig bitwig-studio4 = pkgs.callPackage ./bitwig/bitwig-studio4.nix { }; @@ -113,6 +114,7 @@ ripplerx = self.packages.${system}.ripplerx; aida-x = self.packages.${system}.aida-x; iem-plugin-suite = self.packages.${system}.iem-plugin-suite; + mcfx = self.packages.${system}.mcfx; }); devShells.${system}.juce = pkgs.callPackage ./devshell/juce.nix { }; From b5ba70a2f47c0bcd889bfd7621d3fcc62f42ba1f Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Tue, 5 Aug 2025 13:30:53 +0200 Subject: [PATCH 07/12] successful mcfx build, adding ambix --- ambisonics/ambix.nix | 151 +++++++++++++++++++++++++++++++++++++++++++ ambisonics/mcfx.nix | 16 ++--- flake.nix | 6 +- 3 files changed, 163 insertions(+), 10 deletions(-) create mode 100644 ambisonics/ambix.nix diff --git a/ambisonics/ambix.nix b/ambisonics/ambix.nix new file mode 100644 index 0000000..3e36a0d --- /dev/null +++ b/ambisonics/ambix.nix @@ -0,0 +1,151 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, alsa-lib +, freetype +, webkitgtk_4_1 +, curl +, jack2 +, xorg +, libGL +, mesa +, fftw +, fftwFloat +, zita-convolver +, eigen +# Configurable build options +, enableVST ? true +, enableStandalone ? false +, enableLV2 ? false +, enableZitaConvolver ? false +, enableAdvancedControl ? true +, enableOSC ? true +, ambiOrder ? 7 +, numOutputsDecoder ? 64 +, numFilters ? 8 +, numFiltersVmic ? 8 +}: +let + buildType = "Release"; + # Ensure at least one format is enabled + hasAnyFormat = enableVST || enableStandalone || enableLV2; +in +assert lib.assertMsg hasAnyFormat "At least one plugin format must be enabled"; +stdenv.mkDerivation (finalAttrs: { + pname = "ambix"; + version = "0.2.10"; + + src = fetchFromGitHub { + owner = "kronihias"; + repo = "ambix"; + rev = "v${finalAttrs.version}"; + sha256 = ""; # You'll need to add the correct hash after first build attempt + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ + alsa-lib + freetype + webkitgtk_4_1 + curl + jack2 + xorg.libX11 + xorg.libXcomposite + xorg.libXcursor + xorg.libXext + xorg.libXinerama + xorg.xrandr + xorg.libXrender + libGL + mesa + fftw + fftwFloat + eigen + ] ++ lib.optionals enableZitaConvolver [ + zita-convolver + ]; + + # JUCE dlopens these, make sure they are in rpath + NIX_LDFLAGS = toString ([ + "-lX11" + "-lXext" + "-lXcursor" + "-lXinerama" + "-lXrandr" + "-lXrender" + "-lXcomposite" + "-lGL" + "-lfftw3f" + ] ++ lib.optionals enableZitaConvolver [ + "-lzita-convolver" + ]); + + cmakeFlags = [ + "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar" + "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" + "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm" + "-DCMAKE_BUILD_TYPE=${buildType}" + "-DBUILD_VST=${if enableVST then "TRUE" else "FALSE"}" + "-DBUILD_LV2=${if enableLV2 then "TRUE" else "FALSE"}" + "-DBUILD_STANDALONE=${if enableStandalone then "TRUE" else "FALSE"}" + "-DWITH_ADVANCED_CONTROL=${if enableAdvancedControl then "TRUE" else "FALSE"}" + "-DWITH_OSC=${if enableOSC then "TRUE" else "FALSE"}" + "-DAMBI_ORDER=${toString ambiOrder}" + "-DNUM_OUTPUTS_DECODER=${toString numOutputsDecoder}" + "-DNUM_FILTERS=${toString numFilters}" + "-DNUM_FILTERS_VMIC=${toString numFiltersVmic}" + ] ++ lib.optionals (stdenv.isLinux && enableZitaConvolver) [ + "-DWITH_ZITA_CONVOLVER=TRUE" + ]; + + cmakeBuildType = buildType; + + installPhase = let + vstpath = "${placeholder "out"}/lib/vst"; + lv2path = "${placeholder "out"}/lib/lv2"; + binpath = "${placeholder "out"}/bin"; + in + '' + runHook preInstall + + ${lib.optionalString enableVST "mkdir -p ${vstpath}"} + ${lib.optionalString enableLV2 "mkdir -p ${lv2path}"} + ${lib.optionalString enableStandalone "mkdir -p ${binpath}"} + + ${lib.optionalString enableVST '' + # Install VST plugins from order-specific directory + find . -name "*.so" -path "*/vst_o${toString ambiOrder}/*" -exec cp {} ${vstpath}/ \; + ''} + + ${lib.optionalString enableLV2 '' + # Install LV2 plugins from order-specific directory + find . -name "*.lv2" -path "*/lv2_o${toString ambiOrder}/*" -type d -exec cp -R {} ${lv2path}/ \; + ''} + + ${lib.optionalString enableStandalone '' + # Install standalone applications - be more specific to avoid CMake artifacts + find . -name "ambix_*" -type f -executable -not -name "*.so" -not -path "*.lv2/*" -not -name "CMake*" -exec cp {} ${binpath}/ \; + ''} + + runHook postInstall + ''; + + meta = with lib; { + description = "Ambisonic plug-in suite with variable order for production, analysis and playback"; + longDescription = '' + The ambix plug-in suite handles Ambisonic audio up to high orders and + is designed for content creation, analysis and playback. The tools + are available as VST2, LV2 plug-ins and standalone applications. + + This package builds with Ambisonic order ${toString ambiOrder}. + ''; + homepage = "https://github.com/kronihias/ambix"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ]; # Add your maintainer info here + }; +}) \ No newline at end of file diff --git a/ambisonics/mcfx.nix b/ambisonics/mcfx.nix index 41fdc72..457e776 100644 --- a/ambisonics/mcfx.nix +++ b/ambisonics/mcfx.nix @@ -17,10 +17,10 @@ # Configurable build options , enableVST2 ? false , enableVST3 ? true -, enableStandalone ? false +, enableStandalone ? true , enableLV2 ? false , enableZitaConvolver ? true -, numChannels ? 36 +, numChannels ? 64 , maxDelayTimeS ? "0.5" }: let @@ -28,13 +28,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "mcfx"; - version = "0.6.10"; + version = "0.6.3"; src = fetchFromGitHub { owner = "kronihias"; repo = "mcfx"; rev = "v${finalAttrs.version}"; - sha256 = ""; # You'll need to add the correct hash after first build attempt + sha256 = "sha256-zAQQTFSS6T4Ay1qYTdQf47pRXbqAGTc6jDtUKjChZso="; # You'll need to add the correct hash after first build attempt fetchSubmodules = true; }; @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { ]; # JUCE dlopens these, make sure they are in rpath - NIX_LDFLAGS = (toString [ + NIX_LDFLAGS = toString ([ "-lX11" "-lXext" "-lXcursor" @@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: { ''} ${lib.optionalString enableVST2 '' - # Install VST2 plugins + # Install VST2 plugins find . -name "*.so" -path "*/vst/*" -exec cp {} ${vstpath}/ \; ''} @@ -132,8 +132,8 @@ stdenv.mkDerivation (finalAttrs: { ''} ${lib.optionalString enableStandalone '' - # Install standalone applications - find . -name "*" -type f -executable -not -name "*.so" -not -path "*.vst3/*" -not -path "*.lv2/*" -exec cp {} ${binpath}/ \; 2>/dev/null || true + # Install standalone applications - be more specific to avoid CMake artifacts + find . -name "mcfx_*" -type f -executable -not -name "*.so" -not -path "*.vst3/*" -not -path "*.lv2/*" -exec cp {} ${binpath}/ \; ''} runHook postInstall diff --git a/flake.nix b/flake.nix index 1afd5bb..fc82a95 100644 --- a/flake.nix +++ b/flake.nix @@ -26,8 +26,9 @@ vital = pkgs.callPackage ./vst/vital.nix { }; ripplerx = pkgs.callPackage ./vst/ripplerx.nix { }; aida-x = pkgs.callPackage ./vst/aida-x.nix { }; - iem-plugin-suite = pkgs.callPackage ./vst/ambisonics/iem-plugin-suite.nix { }; - mcfx = pkgs.callPackage ./vst/ambisonics/mcfx.nix { }; + iem-plugin-suite = pkgs.callPackage ./ambisonics/iem-plugin-suite.nix { }; + mcfx = pkgs.callPackage ./ambisonics/mcfx.nix { }; + ambix = pkgs.callPackage ./ambisonics/ambix.nix { }; # Bitwig bitwig-studio4 = pkgs.callPackage ./bitwig/bitwig-studio4.nix { }; @@ -115,6 +116,7 @@ aida-x = self.packages.${system}.aida-x; iem-plugin-suite = self.packages.${system}.iem-plugin-suite; mcfx = self.packages.${system}.mcfx; + ambix = self.packages.${system}.ambix; }); devShells.${system}.juce = pkgs.callPackage ./devshell/juce.nix { }; From eec48cd8cd4526012405fe225321940f85af85cc Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Tue, 5 Aug 2025 14:41:40 +0200 Subject: [PATCH 08/12] ambix failed to compile, deleting --- ambisonics/ambix.nix | 151 ------------------------------------------- ambisonics/mcfx.nix | 2 +- flake.nix | 2 - 3 files changed, 1 insertion(+), 154 deletions(-) delete mode 100644 ambisonics/ambix.nix diff --git a/ambisonics/ambix.nix b/ambisonics/ambix.nix deleted file mode 100644 index 3e36a0d..0000000 --- a/ambisonics/ambix.nix +++ /dev/null @@ -1,151 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, alsa-lib -, freetype -, webkitgtk_4_1 -, curl -, jack2 -, xorg -, libGL -, mesa -, fftw -, fftwFloat -, zita-convolver -, eigen -# Configurable build options -, enableVST ? true -, enableStandalone ? false -, enableLV2 ? false -, enableZitaConvolver ? false -, enableAdvancedControl ? true -, enableOSC ? true -, ambiOrder ? 7 -, numOutputsDecoder ? 64 -, numFilters ? 8 -, numFiltersVmic ? 8 -}: -let - buildType = "Release"; - # Ensure at least one format is enabled - hasAnyFormat = enableVST || enableStandalone || enableLV2; -in -assert lib.assertMsg hasAnyFormat "At least one plugin format must be enabled"; -stdenv.mkDerivation (finalAttrs: { - pname = "ambix"; - version = "0.2.10"; - - src = fetchFromGitHub { - owner = "kronihias"; - repo = "ambix"; - rev = "v${finalAttrs.version}"; - sha256 = ""; # You'll need to add the correct hash after first build attempt - fetchSubmodules = true; - }; - - nativeBuildInputs = [ cmake pkg-config ]; - - buildInputs = [ - alsa-lib - freetype - webkitgtk_4_1 - curl - jack2 - xorg.libX11 - xorg.libXcomposite - xorg.libXcursor - xorg.libXext - xorg.libXinerama - xorg.xrandr - xorg.libXrender - libGL - mesa - fftw - fftwFloat - eigen - ] ++ lib.optionals enableZitaConvolver [ - zita-convolver - ]; - - # JUCE dlopens these, make sure they are in rpath - NIX_LDFLAGS = toString ([ - "-lX11" - "-lXext" - "-lXcursor" - "-lXinerama" - "-lXrandr" - "-lXrender" - "-lXcomposite" - "-lGL" - "-lfftw3f" - ] ++ lib.optionals enableZitaConvolver [ - "-lzita-convolver" - ]); - - cmakeFlags = [ - "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar" - "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib" - "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm" - "-DCMAKE_BUILD_TYPE=${buildType}" - "-DBUILD_VST=${if enableVST then "TRUE" else "FALSE"}" - "-DBUILD_LV2=${if enableLV2 then "TRUE" else "FALSE"}" - "-DBUILD_STANDALONE=${if enableStandalone then "TRUE" else "FALSE"}" - "-DWITH_ADVANCED_CONTROL=${if enableAdvancedControl then "TRUE" else "FALSE"}" - "-DWITH_OSC=${if enableOSC then "TRUE" else "FALSE"}" - "-DAMBI_ORDER=${toString ambiOrder}" - "-DNUM_OUTPUTS_DECODER=${toString numOutputsDecoder}" - "-DNUM_FILTERS=${toString numFilters}" - "-DNUM_FILTERS_VMIC=${toString numFiltersVmic}" - ] ++ lib.optionals (stdenv.isLinux && enableZitaConvolver) [ - "-DWITH_ZITA_CONVOLVER=TRUE" - ]; - - cmakeBuildType = buildType; - - installPhase = let - vstpath = "${placeholder "out"}/lib/vst"; - lv2path = "${placeholder "out"}/lib/lv2"; - binpath = "${placeholder "out"}/bin"; - in - '' - runHook preInstall - - ${lib.optionalString enableVST "mkdir -p ${vstpath}"} - ${lib.optionalString enableLV2 "mkdir -p ${lv2path}"} - ${lib.optionalString enableStandalone "mkdir -p ${binpath}"} - - ${lib.optionalString enableVST '' - # Install VST plugins from order-specific directory - find . -name "*.so" -path "*/vst_o${toString ambiOrder}/*" -exec cp {} ${vstpath}/ \; - ''} - - ${lib.optionalString enableLV2 '' - # Install LV2 plugins from order-specific directory - find . -name "*.lv2" -path "*/lv2_o${toString ambiOrder}/*" -type d -exec cp -R {} ${lv2path}/ \; - ''} - - ${lib.optionalString enableStandalone '' - # Install standalone applications - be more specific to avoid CMake artifacts - find . -name "ambix_*" -type f -executable -not -name "*.so" -not -path "*.lv2/*" -not -name "CMake*" -exec cp {} ${binpath}/ \; - ''} - - runHook postInstall - ''; - - meta = with lib; { - description = "Ambisonic plug-in suite with variable order for production, analysis and playback"; - longDescription = '' - The ambix plug-in suite handles Ambisonic audio up to high orders and - is designed for content creation, analysis and playback. The tools - are available as VST2, LV2 plug-ins and standalone applications. - - This package builds with Ambisonic order ${toString ambiOrder}. - ''; - homepage = "https://github.com/kronihias/ambix"; - license = licenses.gpl2Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ ]; # Add your maintainer info here - }; -}) \ No newline at end of file diff --git a/ambisonics/mcfx.nix b/ambisonics/mcfx.nix index 457e776..cae3a6a 100644 --- a/ambisonics/mcfx.nix +++ b/ambisonics/mcfx.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "kronihias"; repo = "mcfx"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-zAQQTFSS6T4Ay1qYTdQf47pRXbqAGTc6jDtUKjChZso="; # You'll need to add the correct hash after first build attempt + sha256 = "sha256-zAQQTFSS6T4Ay1qYTdQf47pRXbqAGTc6jDtUKjChZso="; fetchSubmodules = true; }; diff --git a/flake.nix b/flake.nix index fc82a95..425b6e8 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,6 @@ aida-x = pkgs.callPackage ./vst/aida-x.nix { }; iem-plugin-suite = pkgs.callPackage ./ambisonics/iem-plugin-suite.nix { }; mcfx = pkgs.callPackage ./ambisonics/mcfx.nix { }; - ambix = pkgs.callPackage ./ambisonics/ambix.nix { }; # Bitwig bitwig-studio4 = pkgs.callPackage ./bitwig/bitwig-studio4.nix { }; @@ -116,7 +115,6 @@ aida-x = self.packages.${system}.aida-x; iem-plugin-suite = self.packages.${system}.iem-plugin-suite; mcfx = self.packages.${system}.mcfx; - ambix = self.packages.${system}.ambix; }); devShells.${system}.juce = pkgs.callPackage ./devshell/juce.nix { }; From 8f8aa600ff4a2cadf8f0332428c9a3981cc09cf8 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Wed, 6 Aug 2025 10:07:01 +0200 Subject: [PATCH 09/12] add plugincollider --- computer-music/plugincollider.nix | 76 +++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 computer-music/plugincollider.nix diff --git a/computer-music/plugincollider.nix b/computer-music/plugincollider.nix new file mode 100644 index 0000000..2099610 --- /dev/null +++ b/computer-music/plugincollider.nix @@ -0,0 +1,76 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, alsa-lib +, freetype +, webkitgtk_4_1 +, curl +, xorg +, jack2 +, libsndfile +, boost +, fftw +, fftwFloat +, enableDynamicPlugins ? false +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "plugincollider"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "simonvanderveldt"; + repo = "PluginCollider"; + rev = "v${finalAttrs.version}"; + sha256 = lib.fakeSha256; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ + freetype + alsa-lib + jack2 + xorg.libX11 + xorg.libXext + xorg.libXinerama + xorg.xrandr + xorg.libXcursor + xorg.libXrender + libsndfile + boost + fftw + fftwFloat + ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DSC_DYNAMIC_PLUGINS=${if enableDynamicPlugins then "ON" else "OFF"}" + ]; + + # Let CMake handle most of the configuration automatically + postPatch = '' + # Only patch if absolutely necessary - let the build system work as designed + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/vst3 + find . -name "PluginCollider.vst3" -type d -exec cp -R {} $out/lib/vst3/ \; + + runHook postInstall + ''; + + enableParallelBuilding = false; + + meta = with lib; { + description = "SuperCollider as a VST3 plugin using JUCE"; + homepage = "https://github.com/simonvanderveldt/PluginCollider"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +}) \ No newline at end of file From ec8afac8399408b65c4755e1e0583236c984b822 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Wed, 6 Aug 2025 10:08:53 +0200 Subject: [PATCH 10/12] plugincollider in flake --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 425b6e8..2fcb1fb 100644 --- a/flake.nix +++ b/flake.nix @@ -26,9 +26,14 @@ vital = pkgs.callPackage ./vst/vital.nix { }; ripplerx = pkgs.callPackage ./vst/ripplerx.nix { }; aida-x = pkgs.callPackage ./vst/aida-x.nix { }; + + # Ambisonics iem-plugin-suite = pkgs.callPackage ./ambisonics/iem-plugin-suite.nix { }; mcfx = pkgs.callPackage ./ambisonics/mcfx.nix { }; + # Computer Music + plugincollider = pkgs.callPackage ./computer-music/plugincollider.nix { }; + # Bitwig bitwig-studio4 = pkgs.callPackage ./bitwig/bitwig-studio4.nix { }; bitwig-studio5 = pkgs.callPackage ./bitwig/bitwig-studio-5.0.nix { }; @@ -115,6 +120,7 @@ aida-x = self.packages.${system}.aida-x; iem-plugin-suite = self.packages.${system}.iem-plugin-suite; mcfx = self.packages.${system}.mcfx; + plugincollider = self.packages.${system}.plugincollider; }); devShells.${system}.juce = pkgs.callPackage ./devshell/juce.nix { }; From 4ff93ab0f77a01e9b7c5f427c90ce21f8262f540 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Thu, 7 Aug 2025 20:31:52 +0200 Subject: [PATCH 11/12] plugincollider working --- computer-music/plugincollider.nix | 34 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/computer-music/plugincollider.nix b/computer-music/plugincollider.nix index 2099610..d901445 100644 --- a/computer-music/plugincollider.nix +++ b/computer-music/plugincollider.nix @@ -5,6 +5,7 @@ , pkg-config , alsa-lib , freetype +, fontconfig , webkitgtk_4_1 , curl , xorg @@ -21,10 +22,10 @@ stdenv.mkDerivation (finalAttrs: { version = "0.3.1"; src = fetchFromGitHub { - owner = "simonvanderveldt"; - repo = "PluginCollider"; + owner = "asb2m10"; + repo = "plugincollider"; rev = "v${finalAttrs.version}"; - sha256 = lib.fakeSha256; + sha256 = "sha256-vnTwoQJeul5j9f39WQBaayxTGWhF1KxNWJsBTSI3MSk="; fetchSubmodules = true; }; @@ -32,12 +33,13 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ freetype + fontconfig # Add this for fontconfig/fontconfig.h alsa-lib jack2 xorg.libX11 xorg.libXext xorg.libXinerama - xorg.xrandr + xorg.libXrandr # This provides the headers (X11/extensions/Xrandr.h) xorg.libXcursor xorg.libXrender libsndfile @@ -46,21 +48,39 @@ stdenv.mkDerivation (finalAttrs: { fftwFloat ]; + # Patch to disable plugin copying + postPatch = '' + sed -i 's/COPY_PLUGIN_AFTER_BUILD TRUE/COPY_PLUGIN_AFTER_BUILD FALSE/g' CMakeLists.txt + ''; + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DSC_DYNAMIC_PLUGINS=${if enableDynamicPlugins then "ON" else "OFF"}" + "-DCMAKE_VERBOSE_MAKEFILE=ON" + # Fix LTO issues + "-DCMAKE_CXX_FLAGS=-fno-lto" + "-DCMAKE_C_FLAGS=-fno-lto" ]; - # Let CMake handle most of the configuration automatically - postPatch = '' - # Only patch if absolutely necessary - let the build system work as designed + # Add environment variables to help with linking + preBuild = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fno-lto" + export NIX_LDFLAGS="$NIX_LDFLAGS -fno-lto" ''; installPhase = '' runHook preInstall + # Install VST3 plugin mkdir -p $out/lib/vst3 find . -name "PluginCollider.vst3" -type d -exec cp -R {} $out/lib/vst3/ \; + + # Verify the plugin was built and copied + if [ ! -d "$out/lib/vst3/PluginCollider.vst3" ]; then + echo "ERROR: VST3 plugin not found after build" + find . -name "*.vst3" -type d || echo "No VST3 files found" + exit 1 + fi runHook postInstall ''; From b20c43b2f990a8c1e661a50875b03fe658931a88 Mon Sep 17 00:00:00 2001 From: Filip Dobrocky Date: Thu, 7 Aug 2025 20:56:55 +0200 Subject: [PATCH 12/12] removed plugdata, newer version in nixpkgs --- flake.nix | 2 -- vst/plugdata.nix | 83 ------------------------------------------------ 2 files changed, 85 deletions(-) delete mode 100644 vst/plugdata.nix diff --git a/flake.nix b/flake.nix index 2fcb1fb..e49efdf 100644 --- a/flake.nix +++ b/flake.nix @@ -21,7 +21,6 @@ # Various VSTs amplocker = pkgs.callPackage ./vst/amplocker { }; atlas2 = pkgs.callPackage ./vst/atlas2.nix { }; - plugdata = pkgs.callPackage ./vst/plugdata.nix { }; paulxstretch = pkgs.callPackage ./vst/paulxstretch.nix { }; vital = pkgs.callPackage ./vst/vital.nix { }; ripplerx = pkgs.callPackage ./vst/ripplerx.nix { }; @@ -98,7 +97,6 @@ overlays.default = (final: prev: { atlas2 = self.packages.${system}.atlas2; - plugdata = self.packages.${system}.plugdata; paulxstretch = self.packages.${system}.paulxstretch; bitwig-studio4 = self.packages.${system}.bitwig-studio4; bitwig-studio5 = self.packages.${system}.bitwig-studio5; diff --git a/vst/plugdata.nix b/vst/plugdata.nix deleted file mode 100644 index 6ba451e..0000000 --- a/vst/plugdata.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, ensureNewerSourcesForZipFilesHook -, makeDesktopItem -, graphicsmagick -, cmake -, pkg-config -, alsa-lib -, freetype -, webkitgtk_4_1 -, curl -, xorg -, python3 -}: - -let - # copied from build system: https://build.opensuse.org/package/view_file/home:plugdata/plugdata/PlugData.desktop - desktopItem = makeDesktopItem { - name = "PlugData"; - desktopName = "PlugData"; - icon = "PlugData"; - exec = "plugdata"; - comment = "Pure Data as a plugin, with a new GUI"; - type = "Application"; - categories = [ "AudioVideo" "Music" ]; - }; -in -stdenv.mkDerivation (finalAttrs: { - pname = "plugdata"; - version = "0.7.1"; - - src = fetchFromGitHub { - owner = "plugdata-team"; - repo = finalAttrs.pname; - rev = "v${finalAttrs.version}"; - sha256 = "sha256-156y/L2mNh/09UhsRk0etQyhr8K2Ry61SnFAKlXssLc="; - fetchSubmodules = true; - }; - - nativeBuildInputs = [ cmake pkg-config ensureNewerSourcesForZipFilesHook graphicsmagick python3 ]; - buildInputs = [ - alsa-lib - freetype - webkitgtk_4_1 - curl - xorg.libX11 - xorg.xrandr - xorg.libXext - xorg.libXinerama - xorg.libXrender - xorg.libXinerama - xorg.libXcursor - ]; - - patchPhase = '' - set -x - # Don't build LV2 plugin (it hangs), and don't automatically install - sed -i 's/ LV2 / /g' CMakeLists.txt - ''; - - installPhase = '' - runHook preInstall - - cd .. # build artifacts get put in the directory above the source directory for some reason? - mkdir -p $out/{bin,lib/{clap,vst3}} - cp Plugins/Standalone/plugdata $out/bin - cp -r Plugins/CLAP/plugdata{,-fx}.clap $out/lib/clap - cp -r Plugins/VST3/plugdata{,-fx}.vst3 $out/lib/vst3 - # cp -r Plugins/LV2/plugdata{,-fx}.lv2 $out/lib/lv2 - - install -m444 -D "${desktopItem}"/share/applications/* -t $out/share/applications - runHook postInstall - ''; - - meta = with lib; { - description = "Plugin wrapper around Pure Data to allow patching in a wide selection of DAWs"; - homepage = "https://plugdata.org/"; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ PowerUser64 ]; - }; -})