mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
bison,
|
|
flex,
|
|
pkg-config,
|
|
darwin,
|
|
libsndfile,
|
|
alsa-lib,
|
|
libjack2,
|
|
libpulseaudio,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
version = "1.5.5.8";
|
|
pname = "chuck";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ccrma";
|
|
repo = "chuck";
|
|
tag = "chuck-${finalAttrs.version}";
|
|
hash = "sha256-GBgb7Bnq5R9Gs/chstjxO8qf+MfSXVftwCbgNW5qC5Y=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
bison
|
|
flex
|
|
pkg-config
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.DarwinTools
|
|
];
|
|
|
|
buildInputs = [
|
|
libsndfile
|
|
]
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
alsa-lib
|
|
libpulseaudio
|
|
libjack2
|
|
];
|
|
|
|
makeFlags = [
|
|
"-C src"
|
|
"DESTDIR=$(out)/bin"
|
|
# fix hardcoded gcc
|
|
"CC=cc"
|
|
"CXX=c++"
|
|
];
|
|
buildFlags = [ (if stdenv.hostPlatform.isDarwin then "mac" else "linux-all") ];
|
|
|
|
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=chuck-(.*)" ]; };
|
|
|
|
meta = {
|
|
description = "Programming language for real-time sound synthesis and music creation";
|
|
homepage = "http://chuck.cs.princeton.edu";
|
|
license = with lib.licenses; [
|
|
gpl2Plus
|
|
# or
|
|
mit
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ ];
|
|
mainProgram = "chuck";
|
|
};
|
|
})
|