diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/audio/chuck | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/chuck')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/chuck/clang.patch | 58 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch | 13 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/audio/chuck/default.nix | 43 |
3 files changed, 114 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/chuck/clang.patch b/nixpkgs/pkgs/applications/audio/chuck/clang.patch new file mode 100644 index 000000000000..77227ef0fd44 --- /dev/null +++ b/nixpkgs/pkgs/applications/audio/chuck/clang.patch @@ -0,0 +1,58 @@ +diff --git a/src/ugen_osc.cpp b/src/ugen_osc.cpp +index 6b93c6b..dbefe4f 100644 +--- a/src/ugen_osc.cpp ++++ b/src/ugen_osc.cpp +@@ -1232,7 +1232,7 @@ CK_DLL_CTRL( gen5_coeffs ) + Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(in_args<0) return; ++ if(in_args!=0) return; + size = in_args->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1287,7 +1287,7 @@ CK_DLL_CTRL( gen7_coeffs ) + Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(in_args<0) return; ++ if(in_args!=0) return; + size = in_args->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1340,7 +1340,7 @@ CK_DLL_CTRL( gen9_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1390,7 +1390,7 @@ CK_DLL_CTRL( gen10_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen10coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1441,7 +1441,7 @@ CK_DLL_CTRL( gen17_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen17coeffs, %d\n", weights); +- if(weights<0) return; ++ if(weights!=0) return; + size = weights->size(); + if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1; + +@@ -1502,7 +1502,7 @@ CK_DLL_CTRL( curve_coeffs ) + Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS); + + // fprintf(stdout, "calling gen17coeffs, %d\n", weights); +- if(weights<0) goto done; ++ if(weights!=0) goto done; + + nargs = weights->size(); + if (nargs < 5 || (nargs % 3) != 2) { // check number of args diff --git a/nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch b/nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch new file mode 100644 index 000000000000..3387f7255441 --- /dev/null +++ b/nixpkgs/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 <linux/limits.h> + #endif // __PLATFORM_LINUX__ + ++#ifdef __PLATFORM_MACOSX__ ++#include <limits.h> ++#endif // __PLATFORM_MACOSX__ ++ + #include <stdio.h> + using namespace std; + diff --git a/nixpkgs/pkgs/applications/audio/chuck/default.nix b/nixpkgs/pkgs/applications/audio/chuck/default.nix new file mode 100644 index 000000000000..c10556260c71 --- /dev/null +++ b/nixpkgs/pkgs/applications/audio/chuck/default.nix @@ -0,0 +1,43 @@ +{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which +, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel +, xcbuild +}: + +stdenv.mkDerivation rec { + version = "1.3.5.2"; + name = "chuck-${version}"; + + src = fetchurl { + url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz"; + sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079"; + }; + + nativeBuildInputs = [ flex bison which ]; + + buildInputs = [ libsndfile ] + ++ lib.optional (!stdenv.isDarwin) alsaLib + ++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ]; + + patches = [ ./clang.patch ./darwin-limits.patch ]; + + NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot"; + NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport"; + + postPatch = '' + substituteInPlace src/makefile --replace "/usr/bin" "$out/bin" + substituteInPlace src/makefile.osx \ + --replace "weak_framework" "framework" \ + --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" + ''; + + makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ]; + buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ]; + + meta = with lib; { + description = "Programming language for real-time sound synthesis and music creation"; + homepage = http://chuck.cs.princeton.edu; + license = licenses.gpl2; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ ftrvxmtrx ]; + }; +} |