From d49e6e4b23f4aff9e62d2034773dc62300380a31 Mon Sep 17 00:00:00 2001 From: Siarhei Zirukin Date: Mon, 27 Oct 2014 23:28:10 +0100 Subject: [PATCH] added chuck package --- .../audio/chuck/darwin-limits.patch | 13 +++++++ pkgs/applications/audio/chuck/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 53 insertions(+) create mode 100644 pkgs/applications/audio/chuck/darwin-limits.patch create mode 100644 pkgs/applications/audio/chuck/default.nix diff --git a/pkgs/applications/audio/chuck/darwin-limits.patch b/pkgs/applications/audio/chuck/darwin-limits.patch new file mode 100644 index 000000000000..3387f7255441 --- /dev/null +++ b/pkgs/applications/audio/chuck/darwin-limits.patch @@ -0,0 +1,13 @@ +--- a/src/util_string.cpp 2014-10-27 22:52:11.875981552 +0100 ++++ b/src/util_string.cpp 2014-10-27 22:54:18.613001994 +0100 +@@ -40,6 +40,10 @@ + #include + #endif // __PLATFORM_LINUX__ + ++#ifdef __PLATFORM_MACOSX__ ++#include ++#endif // __PLATFORM_MACOSX__ ++ + #include + using namespace std; + diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix new file mode 100644 index 000000000000..7725ba1e4c80 --- /dev/null +++ b/pkgs/applications/audio/chuck/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which }: + +stdenv.mkDerivation rec { + version = "1.3.4.0"; + name = "chuck-${version}"; + + src = fetchurl { + url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz"; + sha256 = "0cwbk8b1i18nkh2nxwzk2prranw83lgglxw7ccnp6b0r2b2yfpmn"; + }; + + buildInputs = [ bison flex libsndfile which ] + ++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib; + + patches = [ ./darwin-limits.patch ]; + + postPatch = '' + substituteInPlace src/makefile --replace "/usr/bin" "$out/bin" + substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild" + substituteInPlace src/makefile.osx --replace "weak_framework" "framework" + ''; + + buildPhase = + stdenv.lib.optionals stdenv.isLinux ["make -C src linux-alsa"] ++ + stdenv.lib.optionals stdenv.isDarwin ["make -C src osx"]; + + installPhase = '' + install -Dm755 ./src/chuck $out/bin/chuck + ''; + + meta = { + description = "Programming language for real-time sound synthesis and music creation"; + homepage = http://chuck.cs.princeton.edu; + license = stdenv.lib.licenses.gpl2; + platforms = with stdenv.lib.platforms; linux ++ darwin; + maintainers = with stdenv.lib.maintainers; [ ftrvxmtrx ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c41475a85813..c3c599b878b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8896,6 +8896,8 @@ let chromiumDev = lowPrio (chromium.override { channel = "dev"; }); + chuck = callPackage ../applications/audio/chuck { }; + cinelerra = callPackage ../applications/video/cinelerra { }; clawsMail = callPackage ../applications/networking/mailreaders/claws-mail {