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