2023-09-04 18:20:15 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
, pkg-config
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
|
|
|
|
, jack
|
|
|
|
, alsa-lib
|
|
|
|
, libopus
|
|
|
|
, libsamplerate
|
|
|
|
, libsndfile
|
|
|
|
, readline
|
|
|
|
, zita-alsa-pcmi
|
|
|
|
, zita-resampler
|
2023-09-08 13:48:38 +00:00
|
|
|
|
|
|
|
, enableAlsa ? stdenv.hostPlatform.isLinux
|
2023-09-04 18:20:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (final: {
|
|
|
|
pname = "jack-example-tools";
|
|
|
|
version = "4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jackaudio";
|
|
|
|
repo = "jack-example-tools";
|
|
|
|
rev = "tags/${final.version}";
|
|
|
|
hash = "sha256-5jmynNxwNVLxEZ1MaqQUG6kRwipDkjhrdDCbZHtmAHk=";
|
|
|
|
};
|
|
|
|
|
2023-09-08 13:48:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
'';
|
|
|
|
|
2023-09-04 18:20:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config meson ninja ];
|
|
|
|
buildInputs = [
|
|
|
|
jack
|
|
|
|
libopus
|
|
|
|
libsamplerate
|
|
|
|
libsndfile
|
|
|
|
readline
|
2023-09-08 13:48:38 +00:00
|
|
|
] ++ lib.optionals enableAlsa [
|
|
|
|
alsa-lib
|
2023-09-04 18:20:15 +00:00
|
|
|
zita-alsa-pcmi
|
|
|
|
zita-resampler
|
|
|
|
];
|
|
|
|
|
2023-09-08 13:48:38 +00:00
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonEnable "alsa_in_out" enableAlsa)
|
|
|
|
(lib.mesonEnable "zalsa" enableAlsa)
|
|
|
|
];
|
2023-09-04 18:20:15 +00:00
|
|
|
|
|
|
|
# no tests defined, but prepare for some in the future.
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official examples and tools from the JACK project";
|
|
|
|
homepage = "https://jackaudio.org";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2023-09-04 18:20:15 +00:00
|
|
|
};
|
|
|
|
})
|