nixpkgs/pkgs/misc/jackaudio/tools.nix

66 lines
1.2 KiB
Nix
Raw Normal View History

2023-09-04 20:20:15 +02:00
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, meson
, ninja
, jack
, alsa-lib
, libopus
, libsamplerate
, libsndfile
, readline
, zita-alsa-pcmi
, zita-resampler
2023-09-08 15:48:38 +02:00
, enableAlsa ? stdenv.isLinux
2023-09-04 20:20:15 +02: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 15:48:38 +02:00
postPatch = ''
patchShebangs scripts
'';
2023-09-04 20:20:15 +02:00
nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = [
jack
libopus
libsamplerate
libsndfile
readline
2023-09-08 15:48:38 +02:00
] ++ lib.optionals enableAlsa [
alsa-lib
2023-09-04 20:20:15 +02:00
zita-alsa-pcmi
zita-resampler
];
2023-09-08 15:48:38 +02:00
mesonFlags = [
(lib.mesonEnable "alsa_in_out" enableAlsa)
(lib.mesonEnable "zalsa" enableAlsa)
];
2023-09-04 20:20:15 +02: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;
maintainers = with maintainers; [ pennae ];
};
})