3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/chuck/default.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2014-10-27 22:28:10 +00:00
{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which }:
stdenv.mkDerivation rec {
2017-03-05 14:43:12 +00:00
version = "1.3.5.2";
2014-10-27 22:28:10 +00:00
name = "chuck-${version}";
src = fetchurl {
url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
2017-03-05 14:43:12 +00:00
sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079";
2014-10-27 22:28:10 +00:00
};
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
'';
2017-03-05 14:43:12 +00:00
meta = with stdenv.lib; {
2014-10-27 22:28:10 +00:00
description = "Programming language for real-time sound synthesis and music creation";
homepage = http://chuck.cs.princeton.edu;
2017-03-05 14:43:12 +00:00
license = licenses.gpl2;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ ftrvxmtrx ];
2014-10-27 22:28:10 +00:00
};
}