Skip to content
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
154 changes: 154 additions & 0 deletions ambisonics/iem-plugin-suite.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{ 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
, fftw
, fftwFloat
, libGL
, libglvnd
, util-linux
# Configurable build options
, enableStandalone ? true
, enableVST3 ? true
, enableVST2 ? false
, enableLV2 ? false
}:
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 = "sha256-JYe09sSG6cbwpBF8LEfsHDC+v9RZCr7VW1sgTYHPEO0=";
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
# 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
# Otherwise, segfault will happen
NIX_LDFLAGS = (toString [
"-lX11"
"-lXext"
"-lXcursor"
"-lXinerama"
"-lXrandr"
"-lXfixes"
"-lXrender"
"-lXss"
"-lfftw3f"
"-lfftw3"
"-lGL"
]);

# 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}"
"-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;

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 (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}/ \;
''}

${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 Ambisonic production";
longDescription = ''
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;
platforms = platforms.linux;
maintainers = with maintainers; [ ]; # Add your maintainer info here
};
})
154 changes: 154 additions & 0 deletions ambisonics/mcfx.nix
Original file line number Diff line number Diff line change
@@ -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 ? true
, enableLV2 ? false
, enableZitaConvolver ? true
, numChannels ? 64
, maxDelayTimeS ? "0.5"
}:
let
buildType = "Release";
in
stdenv.mkDerivation (finalAttrs: {
pname = "mcfx";
version = "0.6.3";

src = fetchFromGitHub {
owner = "kronihias";
repo = "mcfx";
rev = "v${finalAttrs.version}";
sha256 = "sha256-zAQQTFSS6T4Ay1qYTdQf47pRXbqAGTc6jDtUKjChZso=";
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 - 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
'';

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
};
})
2 changes: 1 addition & 1 deletion bitwig/bitwig-studio-5.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
, xorg
, zlib

, webkitgtk
, webkitgtk_4_1
, curl
, fftwFloat
, jack2
Expand Down
2 changes: 1 addition & 1 deletion bitwig/bitwig-studio-5.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion bitwig/bitwig-studio-5.3-beta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion bitwig/bitwig-studio-5.3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions chow/chow-kick.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
, sqlite
, stdenv
, util-linuxMinimal
, webkitgtk
, webkitgtk_4_1
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
python3
sqlite
util-linuxMinimal
webkitgtk
webkitgtk_4_1
];

cmakeFlags = [
Expand Down
4 changes: 2 additions & 2 deletions chow/chow-multitool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
, pcre2
, pkg-config
, sqlite
, webkitgtk
, webkitgtk_4_1
, stdenv
}:
stdenv.mkDerivation rec {
Expand Down Expand Up @@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
pcre
pcre2
sqlite
webkitgtk
webkitgtk_4_1
];

cmakeFlags = [
Expand Down
Loading