2021-05-01 00:40:53 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-06-19 15:54:10 +02:00
|
|
|
, fetchFromGitHub
|
2023-07-25 17:39:25 +02:00
|
|
|
, qmake
|
|
|
|
, wrapQtAppsHook
|
2023-09-20 18:08:53 +02:00
|
|
|
, qt6Packages
|
2021-05-01 00:40:53 +02:00
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, which
|
2021-06-10 04:57:09 +02:00
|
|
|
, alsa-lib
|
2021-05-01 00:40:53 +02:00
|
|
|
, libsndfile
|
|
|
|
, libpulseaudio
|
|
|
|
, libjack2
|
|
|
|
, audioBackend ? "pulse" # "pulse", "alsa", or "jack"
|
|
|
|
}:
|
|
|
|
|
2023-06-19 15:54:10 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-05-01 00:40:53 +02:00
|
|
|
pname = "miniaudicle";
|
2024-01-01 07:11:03 +01:00
|
|
|
version = "1.5.2.0";
|
2023-06-19 15:54:10 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ccrma";
|
|
|
|
repo = "miniAudicle";
|
2023-07-25 17:39:25 +02:00
|
|
|
rev = "chuck-${finalAttrs.version}";
|
2024-01-01 07:11:03 +01:00
|
|
|
hash = "sha256-jpPF2Qx/6tiotsj92m1XmxsEUgtm5029ijpu3O8B9qM=";
|
2023-06-19 15:54:10 +02:00
|
|
|
fetchSubmodules = true;
|
2021-05-01 00:40:53 +02:00
|
|
|
};
|
|
|
|
|
2023-07-25 15:27:31 +02:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
2021-05-01 00:40:53 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
2023-06-19 15:54:10 +02:00
|
|
|
echo '#define GIT_REVISION "${finalAttrs.version}-NixOS"' > git-rev.h
|
2021-05-01 00:40:53 +02:00
|
|
|
substituteInPlace miniAudicle.pro \
|
|
|
|
--replace "/usr/local" $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
which
|
2023-07-25 17:39:25 +02:00
|
|
|
qmake
|
|
|
|
wrapQtAppsHook
|
2021-05-01 00:40:53 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-10 04:57:09 +02:00
|
|
|
alsa-lib
|
2021-05-01 00:40:53 +02:00
|
|
|
libsndfile
|
2023-09-20 18:08:53 +02:00
|
|
|
qt6Packages.qscintilla
|
2021-05-01 00:40:53 +02:00
|
|
|
] ++ lib.optional (audioBackend == "pulse") libpulseaudio
|
|
|
|
++ lib.optional (audioBackend == "jack") libjack2;
|
|
|
|
|
|
|
|
buildFlags = [ "linux-${audioBackend}" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A light-weight integrated development environment for the ChucK digital audio programming language";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "miniAudicle";
|
2021-05-01 00:40:53 +02:00
|
|
|
homepage = "https://audicle.cs.princeton.edu/mini/";
|
|
|
|
downloadPage = "https://audicle.cs.princeton.edu/mini/linux/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
broken = stdenv.isDarwin; # not attempted
|
|
|
|
};
|
2023-06-19 15:54:10 +02:00
|
|
|
})
|