1 { lib, stdenv, fetchurl, pkg-config
3 # Optional Dependencies
4 , alsa-lib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
10 shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
12 optAlsaLib = shouldUsePkg alsa-lib;
13 optDb = shouldUsePkg db;
14 optLibuuid = shouldUsePkg libuuid;
15 optLibffado = shouldUsePkg libffado;
16 optCelt = shouldUsePkg celt;
18 stdenv.mkDerivation (finalAttrs: {
23 url = "https://jackaudio.org/downloads/jack-audio-connection-kit-${finalAttrs.version}.tar.gz";
24 sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
28 (lib.enableFeature (optLibffado != null) "firewire")
31 nativeBuildInputs = [ pkg-config ];
32 buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
33 propagatedBuildInputs = [ optLibuuid ];
35 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
38 broken = stdenv.hostPlatform.isDarwin;
39 description = "JACK audio connection kit";
40 homepage = "https://jackaudio.org";
41 license = with licenses; [ gpl2Plus lgpl21 ];
42 pkgConfigModules = [ "jack" ];
43 platforms = platforms.unix;