2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Optional Dependencies
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
, testers
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-05-20 23:08:51 +00:00
|
|
|
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
optAlsaLib = shouldUsePkg alsa-lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
optDb = shouldUsePkg db;
|
|
|
|
optLibuuid = shouldUsePkg libuuid;
|
|
|
|
optLibffado = shouldUsePkg libffado;
|
|
|
|
optCelt = shouldUsePkg celt;
|
|
|
|
in
|
2023-02-16 17:41:37 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jack1";
|
|
|
|
version = "0.125.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-16 17:41:37 +00:00
|
|
|
url = "https://jackaudio.org/downloads/jack-audio-connection-kit-${finalAttrs.version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
|
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
2021-01-17 00:15:33 +00:00
|
|
|
(lib.enableFeature (optLibffado != null) "firewire")
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
|
|
|
|
propagatedBuildInputs = [ optLibuuid ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "JACK audio connection kit";
|
|
|
|
homepage = "https://jackaudio.org";
|
|
|
|
license = with licenses; [ gpl2 lgpl21 ];
|
2023-02-16 17:41:37 +00:00
|
|
|
pkgConfigModules = [ "jack" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|