1 { stdenv, lib, fetchurl, alsa-lib, bison, flex, libsndfile, which, DarwinTools, xcbuild
2 , AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel, MultitouchSupport
5 stdenv.mkDerivation rec {
10 url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
11 sha256 = "sha256-hIwsC9rYgXWSTFqUufKGqoT0Gnsf4nR4KQ0iSVbj8xg=";
14 nativeBuildInputs = [ flex bison which ]
15 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools xcbuild ];
17 buildInputs = [ libsndfile ]
18 ++ lib.optional (!stdenv.hostPlatform.isDarwin) alsa-lib
19 ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport ];
21 patches = [ ./darwin-limits.patch ];
23 makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
24 buildFlags = [ (if stdenv.hostPlatform.isDarwin then "mac" else "linux-alsa") ];
27 description = "Programming language for real-time sound synthesis and music creation";
28 homepage = "http://chuck.cs.princeton.edu";
29 license = licenses.gpl2;
30 platforms = platforms.unix;
31 maintainers = with maintainers; [ ftrvxmtrx ];
32 mainProgram = "chuck";