chuck: cleanup
This commit is contained in:
parent
030760a994
commit
ee92ab07ba
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, alsaLib, bison, flex, libsndfile, which
|
{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
|
||||||
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
|
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
|
||||||
|
, xcbuild
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -11,31 +12,28 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079";
|
sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ bison flex libsndfile which ]
|
nativeBuildInputs = [ flex bison which ];
|
||||||
++ stdenv.lib.optional (!stdenv.isDarwin) alsaLib
|
|
||||||
++ stdenv.lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
|
buildInputs = [ libsndfile ]
|
||||||
|
++ lib.optional (!stdenv.isDarwin) alsaLib
|
||||||
|
++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
|
||||||
|
|
||||||
patches = [ ./clang.patch ./darwin-limits.patch ];
|
patches = [ ./clang.patch ./darwin-limits.patch ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
|
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot";
|
||||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
|
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
|
substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
|
||||||
substituteInPlace src/makefile.osx --replace "xcodebuild" "/usr/bin/xcodebuild"
|
substituteInPlace src/makefile.osx \
|
||||||
substituteInPlace src/makefile.osx --replace "weak_framework" "framework"
|
--replace "weak_framework" "framework" \
|
||||||
substituteInPlace src/makefile.osx --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
|
--replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
|
||||||
make -C src ${if stdenv.isDarwin then "osx" else "linux-alsa"}
|
buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ];
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
meta = with lib; {
|
||||||
install -Dm755 ./src/chuck $out/bin/chuck
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Programming language for real-time sound synthesis and music creation";
|
description = "Programming language for real-time sound synthesis and music creation";
|
||||||
homepage = http://chuck.cs.princeton.edu;
|
homepage = http://chuck.cs.princeton.edu;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user