25 # FetchContent replacement, check CMakeLists.txt for requested versions (Nixpkgs' Catch2 works)
26 readerwriterqueue = fetchFromGitHub {
28 repo = "readerwriterqueue";
30 sha256 = "sha256-g7NX7Ucl5GWw3u6TiUOITjhv7492ByTzACtWR0Ph2Jc=";
33 stdenv.mkDerivation rec {
37 src = fetchFromGitHub {
41 fetchSubmodules = true;
42 sha256 = "sha256-X3pzTrNd0G6BouCDkr3dukQTFDzZ7qblIYxFQActKGE=";
46 ./0001-Remove-FetchContent-usage.patch
50 # 1. Remove hardcoded LTO flags: needs extra setup on Linux,
51 # possibly broken on Darwin
52 # https://github.com/NixOS/nixpkgs/issues/19098
53 # 2. Disable automatic copying of built plugins during buildPhase, it defaults
54 # into user home and we want to have building & installing separated.
56 -e '/juce::juce_recommended_lto_flags/d' \
57 -e 's/COPY_PLUGIN_AFTER_BUILD TRUE/COPY_PLUGIN_AFTER_BUILD FALSE/g' \
62 ln -s ${readerwriterqueue} readerwriterqueue
63 ln -s ${catch2.src} Catch2
71 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
79 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
91 vst3Dir = "${placeholder "out"}/${if stdenv.hostPlatform.isDarwin then "Library/Audio/Plug-Ins/VST3" else "lib/vst3"}";
92 auDir = "${placeholder "out"}/Library/Audio/Plug-Ins/Components";
97 # Exact path of the build artefact depends on used CMAKE_BUILD_TYPE
98 cp -R Fire_artefacts/*/VST3/* ${vst3Dir}/
99 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
101 cp -R Fire_artefacts/*/AU/* ${auDir}/
107 # Fails to find fp.h on its own
108 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/";
110 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
113 description = "Multi-band distortion plugin by Wings";
114 homepage = "https://github.com/jerryuhoo/Fire";
115 license = licenses.agpl3Only; # Not clarified if Only or Plus
116 platforms = platforms.unix;
117 maintainers = with maintainers; [ OPNA2608 ];