jack1: Refactor
This commit is contained in:
parent
60a39dec54
commit
04aefc111b
@ -1,8 +1,18 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, alsaLib, db, libuuid
|
{ stdenv, fetchurl, pkgconfig
|
||||||
, firewireSupport ? false, ffado ? null }:
|
|
||||||
|
|
||||||
assert firewireSupport -> ffado != null;
|
# Optional Dependencies
|
||||||
|
, alsaLib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
||||||
|
|
||||||
|
optAlsaLib = shouldUsePkg alsaLib;
|
||||||
|
optDb = shouldUsePkg db;
|
||||||
|
optLibuuid = shouldUsePkg libuuid;
|
||||||
|
optLibffado = shouldUsePkg libffado;
|
||||||
|
optCelt = shouldUsePkg celt;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "jack1-${version}";
|
name = "jack1-${version}";
|
||||||
version = "0.124.1";
|
version = "0.124.1";
|
||||||
@ -12,19 +22,18 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1mk1wnx33anp6haxfjjkfhwbaknfblsvj35nxvz0hvspcmhdyhpb";
|
sha256 = "1mk1wnx33anp6haxfjjkfhwbaknfblsvj35nxvz0hvspcmhdyhpb";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild = "echo ok";
|
|
||||||
|
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
${if firewireSupport then "--enable-firewire" else ""}
|
${if (optLibffado != null) then "--enable-firewire" else ""}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs =
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
[ pkgconfig alsaLib db libuuid
|
buildInputs = [ optAlsaLib optDb optLibuuid optLibffado optCelt ];
|
||||||
] ++ (stdenv.lib.optional firewireSupport ffado);
|
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "JACK audio connection kit";
|
description = "JACK audio connection kit";
|
||||||
homepage = "http://jackaudio.org";
|
homepage = "http://jackaudio.org";
|
||||||
license = "GPL";
|
license = "GPL";
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ wkennington ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user