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