Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 alsa-lib, 6 bison, 7 flex, 8 libsndfile, 9 which, 10 DarwinTools, 11 xcbuild, 12}: 13 14stdenv.mkDerivation rec { 15 version = "1.4.2.0"; 16 pname = "chuck"; 17 18 src = fetchurl { 19 url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz"; 20 sha256 = "sha256-hIwsC9rYgXWSTFqUufKGqoT0Gnsf4nR4KQ0iSVbj8xg="; 21 }; 22 23 nativeBuildInputs = [ 24 flex 25 bison 26 which 27 ] 28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 29 DarwinTools 30 xcbuild 31 ]; 32 33 buildInputs = [ libsndfile ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) alsa-lib; 34 35 patches = [ ./darwin-limits.patch ]; 36 37 makeFlags = [ 38 "-C src" 39 "DESTDIR=$(out)/bin" 40 ]; 41 buildFlags = [ (if stdenv.hostPlatform.isDarwin then "mac" else "linux-alsa") ]; 42 43 meta = with lib; { 44 description = "Programming language for real-time sound synthesis and music creation"; 45 homepage = "http://chuck.cs.princeton.edu"; 46 license = licenses.gpl2; 47 platforms = platforms.unix; 48 maintainers = with maintainers; [ ftrvxmtrx ]; 49 mainProgram = "chuck"; 50 }; 51}