Skip to content

Commit

Permalink
jack-example-tools: add darwin support
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored and ivandimitrov8080 committed Sep 10, 2023
1 parent 68d0d2a commit 528dedb
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkgs/misc/jackaudio/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
, readline
, zita-alsa-pcmi
, zita-resampler

, enableAlsa ? stdenv.isLinux
}:

stdenv.mkDerivation (final: {
Expand All @@ -28,21 +30,27 @@ stdenv.mkDerivation (final: {
hash = "sha256-5jmynNxwNVLxEZ1MaqQUG6kRwipDkjhrdDCbZHtmAHk=";
};

postPatch = ''
patchShebangs scripts
'';

nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = [
jack
alsa-lib
libopus
libsamplerate
libsndfile
readline
] ++ lib.optionals enableAlsa [
alsa-lib
zita-alsa-pcmi
zita-resampler
];

postPatch = ''
patchShebangs scripts
'';
mesonFlags = [
(lib.mesonEnable "alsa_in_out" enableAlsa)
(lib.mesonEnable "zalsa" enableAlsa)
];

# no tests defined, but prepare for some in the future.
doCheck = true;
Expand All @@ -52,7 +60,6 @@ stdenv.mkDerivation (final: {
homepage = "https://jackaudio.org";
license = licenses.gpl2Plus;
platforms = platforms.unix;
broken = stdenv.isDarwin;
maintainers = with maintainers; [ pennae ];
};
})

0 comments on commit 528dedb

Please sign in to comment.