2015-04-26 04:14:28 +01:00
|
|
|
{ stdenv, fetchurl, scons, pkgconfig, which, makeWrapper, python
|
2018-12-15 20:40:26 +00:00
|
|
|
, expat, libraw1394, libconfig, libavc1394, libiec61883, libxmlxx
|
|
|
|
, glibmm
|
|
|
|
, alsaLib, dbus, dbus_cplusplus
|
|
|
|
, pyqt4, dbus-python
|
2015-04-26 04:14:28 +01:00
|
|
|
}:
|
|
|
|
|
2012-04-05 22:53:42 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-12-15 20:40:26 +00:00
|
|
|
name = "ffado-${version}";
|
2018-02-18 12:35:50 +00:00
|
|
|
version = "2.4.0";
|
2012-04-05 22:53:42 +01:00
|
|
|
|
2012-09-30 20:23:28 +01:00
|
|
|
src = fetchurl {
|
2015-04-26 04:14:28 +01:00
|
|
|
url = "http://www.ffado.org/files/libffado-${version}.tgz";
|
2018-02-18 12:35:50 +00:00
|
|
|
sha256 = "14rprlcd0gpvg9kljh0zzjzd2rc9hbqqpjidshxxjvvfh4r00f4f";
|
2012-04-05 22:53:42 +01:00
|
|
|
};
|
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
outputs = [ "out" "bin" "dev" ];
|
|
|
|
|
2015-04-26 04:14:28 +01:00
|
|
|
nativeBuildInputs = [ scons pkgconfig which makeWrapper python ];
|
2012-04-05 22:53:42 +01:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
prefixKey = "PREFIX=";
|
|
|
|
sconsFlags = [
|
|
|
|
"DEBUG=False"
|
|
|
|
"ENABLE_ALL=True"
|
|
|
|
"SERIALIZE_USE_EXPAT=True"
|
|
|
|
"BUILD_TESTS=False"
|
|
|
|
"WILL_DEAL_WITH_XDG_MYSELF=True"
|
|
|
|
"BUILD_MIXER=True"
|
2015-04-26 04:14:28 +01:00
|
|
|
];
|
2012-04-08 00:57:30 +01:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
configurePhase = ''
|
|
|
|
mkdir -p $out/lib/udev/rules.d $bin/bin $dev/include \
|
|
|
|
$out/lib/${python.libPrefix}/site-packages
|
|
|
|
sconsFlagsArray+=(UDEVDIR=$out/lib/udev/rules.d)
|
|
|
|
sconsFlagsArray+=(PYPKGDIR=$out/lib/${python.libPrefix}/site-packages)
|
|
|
|
sconsFlagsArray+=(BINDIR=$bin/bin)
|
|
|
|
sconsFlagsArray+=(INCLUDEDIR=$dev/include)
|
2017-08-25 21:06:56 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libxml++-2.6)"
|
|
|
|
'';
|
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
buildInputs = [
|
|
|
|
expat libraw1394 libconfig libavc1394 libiec61883 dbus dbus_cplusplus
|
|
|
|
libxmlxx pyqt4 dbus-python glibmm
|
|
|
|
];
|
2012-09-30 20:23:28 +01:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed '1iimport sys' -i SConstruct
|
2015-04-26 04:14:28 +01:00
|
|
|
'';
|
2012-04-08 00:57:30 +01:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
postInstall = ''
|
|
|
|
for exe in $bin/bin/ffado-mixer $bin/bin/ffado-diag; do
|
|
|
|
wrapProgram $exe \
|
|
|
|
--prefix PYTHONPATH : $out/lib/${python.libPrefix}/site-packages \
|
|
|
|
--prefix PYTHONPATH : $out/share/libffado/python \
|
|
|
|
--prefix PYTHONPATH : ${pyqt4}/lib/${python.libPrefix}/site-packages \
|
|
|
|
--prefix PYTHONPATH : ${dbus-python}/lib/${python.libPrefix}/site-packages
|
|
|
|
done
|
2015-04-26 04:14:28 +01:00
|
|
|
'';
|
2012-04-05 22:53:42 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.ffado.org;
|
2012-04-08 00:57:30 +01:00
|
|
|
description = "FireWire audio drivers";
|
2012-04-05 22:53:42 +01:00
|
|
|
license = licenses.gpl3;
|
2019-01-26 10:01:09 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2014-03-16 11:08:26 +00:00
|
|
|
platforms = platforms.linux;
|
2012-04-05 22:53:42 +01:00
|
|
|
};
|
|
|
|
}
|