2023-01-11 07:51:40 +00:00
|
|
|
{ stdenv, lib, fetchurl, alsa-lib, bison, flex, libsndfile, which, DarwinTools, xcbuild
|
|
|
|
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel, MultitouchSupport
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.4.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "chuck";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-hIwsC9rYgXWSTFqUufKGqoT0Gnsf4nR4KQ0iSVbj8xg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [ flex bison which ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ DarwinTools xcbuild ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libsndfile ]
|
2021-06-28 23:13:55 +00:00
|
|
|
++ lib.optional (!stdenv.isDarwin) alsa-lib
|
2023-01-11 07:51:40 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./darwin-limits.patch ];
|
|
|
|
|
|
|
|
makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
|
2023-01-11 07:51:40 +00:00
|
|
|
buildFlags = [ (if stdenv.isDarwin then "mac" else "linux-alsa") ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Programming language for real-time sound synthesis and music creation";
|
|
|
|
homepage = "http://chuck.cs.princeton.edu";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ftrvxmtrx ];
|
|
|
|
};
|
|
|
|
}
|