1 { lib, stdenv, fetchurl, pkg-config
3 # Optional Dependencies
4 , alsaLib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
8 shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
10 optAlsaLib = shouldUsePkg alsaLib;
11 optDb = shouldUsePkg db;
12 optLibuuid = shouldUsePkg libuuid;
13 optLibffado = shouldUsePkg libffado;
14 optCelt = shouldUsePkg celt;
16 stdenv.mkDerivation rec {
21 url = "https://jackaudio.org/downloads/jack-audio-connection-kit-${version}.tar.gz";
22 sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
26 (lib.enableFeature (optLibffado != null) "firewire")
29 nativeBuildInputs = [ pkg-config ];
30 buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
31 propagatedBuildInputs = [ optLibuuid ];
34 description = "JACK audio connection kit";
35 homepage = "https://jackaudio.org";
36 license = with licenses; [ gpl2 lgpl21 ];
37 platforms = platforms.unix;