lol
1{ stdenv, fetchFromGitHub, cmake, libsndfile, libsamplerate, flex, bison, boost, gettext
2, alsaLib ? null
3, libpulseaudio ? null
4, libjack2 ? null
5, liblo ? null
6, ladspa-sdk ? null
7, fluidsynth ? null
8# , gmm ? null # opcodes don't build with gmm 5.1
9, eigen ? null
10, curl ? null
11, tcltk ? null
12, fltk ? null
13}:
14
15stdenv.mkDerivation rec {
16 name = "csound-${version}";
17 version = "6.09.0";
18
19 enableParallelBuilding = true;
20
21 hardeningDisable = [ "format" ];
22
23 src = fetchFromGitHub {
24 owner = "csound";
25 repo = "csound";
26 rev = version;
27 sha256 = "1vfb0mab89psfwidadjrn5mbzq3bhjbyrrmyp98yp0xm6a8cssih";
28 };
29
30 cmakeFlags = [ "-DBUILD_CSOUND_AC=0" ] # fails to find Score.hpp
31 ++ stdenv.lib.optional (libjack2 != null) "-DJACK_HEADER=${libjack2}/include/jack/jack.h";
32
33 nativeBuildInputs = [ cmake flex bison gettext ];
34 buildInputs = [ libsndfile libsamplerate boost ]
35 ++ builtins.filter (optional: optional != null) [
36 alsaLib libpulseaudio libjack2
37 liblo ladspa-sdk fluidsynth eigen
38 curl tcltk fltk ];
39
40 meta = with stdenv.lib; {
41 description = "Sound design, audio synthesis, and signal processing system, providing facilities for music composition and performance on all major operating systems and platforms";
42 homepage = http://www.csounds.com/;
43 license = licenses.gpl2;
44 maintainers = [maintainers.marcweber];
45 platforms = platforms.linux;
46 };
47}
48