2018-08-17 06:54:32 +03:00
|
|
|
{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
|
2018-03-09 01:33:35 +03:00
|
|
|
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
|
|
|
|
}:
|
2014-10-28 01:28:10 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-04 22:10:31 +03:00
|
|
|
version = "1.4.0.1";
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "chuck";
|
2014-10-28 01:28:10 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
|
2020-05-04 22:10:31 +03:00
|
|
|
sha256 = "1m0fhndbqaf0lii1asyc50c66bv55ib6mbnm8fzk5qc5ncs0r8hi";
|
2014-10-28 01:28:10 +03:00
|
|
|
};
|
|
|
|
|
2018-08-17 06:54:32 +03:00
|
|
|
nativeBuildInputs = [ flex bison which ];
|
|
|
|
|
|
|
|
buildInputs = [ libsndfile ]
|
|
|
|
++ lib.optional (!stdenv.isDarwin) alsaLib
|
|
|
|
++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
|
2014-10-28 01:28:10 +03:00
|
|
|
|
2019-07-31 15:05:55 +03:00
|
|
|
patches = [ ./darwin-limits.patch ];
|
2018-03-09 01:33:35 +03:00
|
|
|
|
2019-10-30 04:29:30 +03:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
|
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
|
2014-10-28 01:28:10 +03:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-07-31 15:05:55 +03:00
|
|
|
substituteInPlace src/core/makefile.x/makefile.osx \
|
2018-08-17 06:54:32 +03:00
|
|
|
--replace "weak_framework" "framework" \
|
2019-07-31 15:05:55 +03:00
|
|
|
--replace "MACOSX_DEPLOYMENT_TARGET=10.9" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
|
2018-03-09 01:33:35 +03:00
|
|
|
'';
|
2014-10-28 01:28:10 +03:00
|
|
|
|
2018-08-17 06:54:32 +03:00
|
|
|
makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
|
|
|
|
buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ];
|
2014-10-28 01:28:10 +03:00
|
|
|
|
2018-08-17 06:54:32 +03:00
|
|
|
meta = with lib; {
|
2014-10-28 01:28:10 +03:00
|
|
|
description = "Programming language for real-time sound synthesis and music creation";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "http://chuck.cs.princeton.edu";
|
2017-03-05 17:43:12 +03:00
|
|
|
license = licenses.gpl2;
|
2019-07-31 15:05:55 +03:00
|
|
|
platforms = platforms.unix;
|
2017-03-05 17:43:12 +03:00
|
|
|
maintainers = with maintainers; [ ftrvxmtrx ];
|
2014-10-28 01:28:10 +03:00
|
|
|
};
|
|
|
|
}
|