2015-04-26 05:14:56 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
2014-07-31 12:47:17 +02:00
|
|
|
|
2015-04-26 05:14:56 +02:00
|
|
|
# Optional Dependencies
|
|
|
|
, alsaLib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
|
|
|
|
}:
|
2014-07-31 12:47:17 +02:00
|
|
|
|
2015-04-26 05:14:56 +02:00
|
|
|
let
|
2018-03-09 23:58:36 +01:00
|
|
|
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
2015-06-01 20:52:03 +02:00
|
|
|
|
2015-04-26 05:14:56 +02:00
|
|
|
optAlsaLib = shouldUsePkg alsaLib;
|
|
|
|
optDb = shouldUsePkg db;
|
|
|
|
optLibuuid = shouldUsePkg libuuid;
|
|
|
|
optLibffado = shouldUsePkg libffado;
|
|
|
|
optCelt = shouldUsePkg celt;
|
|
|
|
in
|
2014-07-31 12:47:17 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jack1-${version}";
|
2018-03-17 02:07:08 +01:00
|
|
|
version = "0.125.0";
|
2014-07-31 12:47:17 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://jackaudio.org/downloads/jack-audio-connection-kit-${version}.tar.gz";
|
2018-03-17 02:07:08 +01:00
|
|
|
sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
|
2014-07-31 12:47:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = ''
|
2015-04-26 05:14:56 +02:00
|
|
|
${if (optLibffado != null) then "--enable-firewire" else ""}
|
2014-07-31 12:47:17 +02:00
|
|
|
'';
|
|
|
|
|
2015-04-26 05:14:56 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2015-11-14 21:32:51 +01:00
|
|
|
buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
|
|
|
|
propagatedBuildInputs = [ optLibuuid ];
|
2014-07-31 12:47:17 +02:00
|
|
|
|
2015-04-26 05:14:56 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-07-31 12:47:17 +02:00
|
|
|
description = "JACK audio connection kit";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://jackaudio.org;
|
2014-07-31 12:47:17 +02:00
|
|
|
license = "GPL";
|
2015-04-26 05:14:56 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2014-07-31 12:47:17 +02:00
|
|
|
};
|
|
|
|
}
|