1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 15:47:28 +00:00
nixpkgs/pkgs/applications/audio/chuck/default.nix

43 lines
1.5 KiB
Nix
Raw Normal View History

2018-08-17 04:54:32 +01:00
{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
2018-03-08 22:33:35 +00:00
, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
}:
2014-10-27 22:28:10 +00:00
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
};
2018-08-17 04:54:32 +01:00
nativeBuildInputs = [ flex bison which ];
buildInputs = [ libsndfile ]
++ lib.optional (!stdenv.isDarwin) alsaLib
++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
2014-10-27 22:28:10 +00:00
2018-03-08 22:33:35 +00:00
patches = [ ./clang.patch ./darwin-limits.patch ];
2018-08-17 04:54:32 +01:00
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot";
NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport";
2014-10-27 22:28:10 +00:00
postPatch = ''
substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
2018-08-17 04:54:32 +01:00
substituteInPlace src/makefile.osx \
--replace "weak_framework" "framework" \
--replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
2018-03-08 22:33:35 +00:00
'';
2014-10-27 22:28:10 +00:00
2018-08-17 04:54:32 +01:00
makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ];
2014-10-27 22:28:10 +00:00
2018-08-17 04:54:32 +01:00
meta = with 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
};
}