39 # JUCE version in submodules is incompatible with GCC12
40 # See here: https://forum.juce.com/t/build-fails-on-fedora-wrong-c-version/50902/2
43 stdenv.mkDerivation (finalAttrs: {
44 pname = "chow-tape-model";
47 src = fetchFromGitHub {
48 owner = "jatinchowdhury18";
49 repo = "AnalogTapeModel";
50 rev = "v${finalAttrs.version}";
51 hash = "sha256-WriHi68Y6hAsrwE+74JtVlAKUR9lfTczj6UK9h2FOGM=";
52 fetchSubmodules = true;
93 # Link-time-optimization fails without these
95 "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
96 "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
97 "-DCMAKE_NM=${stdenv.cc.cc}/bin/gcc-nm"
100 cmakeBuildType = "Release";
102 postPatch = "cd Plugin";
105 mkdir -p $out/lib/lv2 $out/lib/vst3 $out/lib/clap $out/bin $out/share/doc/CHOWTapeModel/
106 cd CHOWTapeModel_artefacts/${finalAttrs.cmakeBuildType}
107 cp -r LV2/CHOWTapeModel.lv2 $out/lib/lv2
108 cp -r VST3/CHOWTapeModel.vst3 $out/lib/vst3
109 cp -r CLAP/CHOWTapeModel.clap $out/lib/clap
110 cp Standalone/CHOWTapeModel $out/bin
111 cp ../../../../Manual/ChowTapeManual.pdf $out/share/doc/CHOWTapeModel/
114 # JUCE dlopens these, make sure they are in rpath
115 # Otherwise, segfault will happen
127 homepage = "https://github.com/jatinchowdhury18/AnalogTapeModel";
128 description = "Physical modelling signal processing for analog tape recording. LV2, VST3, CLAP, and standalone";
129 license = with licenses; [ gpl3Only ];
130 maintainers = with maintainers; [ magnetophon ];
131 platforms = platforms.linux;
132 # error: 'vvtanh' was not declared in this scope; did you mean 'tanh'?
133 # error: no matching function for call to 'juce::dsp::SIMDRegister<double>::SIMDRegister(xsimd::simd_batch_traits<xsimd::batch<double, 2> >::batch_bool_type)'
134 broken = stdenv.hostPlatform.isAarch64; # since 2021-12-27 on hydra (update to 2.10): https://hydra.nixos.org/build/162558991
135 mainProgram = "CHOWTapeModel";