2012-09-30 20:23:28 +01:00
|
|
|
{ stdenv, fetchurl, dbus, dbus_cplusplus, expat, glibmm, libconfig
|
2012-04-08 00:57:30 +01:00
|
|
|
, libavc1394, libiec61883, libraw1394, libxmlxx, makeWrapper, pkgconfig
|
|
|
|
, pyqt4, python, pythonDBus, qt4, scons }:
|
2012-04-05 22:53:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-09-30 20:23:28 +01:00
|
|
|
name = "libffado-${version}";
|
2014-08-24 14:11:22 +01:00
|
|
|
version = "2.2.1";
|
2012-04-05 22:53:42 +01:00
|
|
|
|
2012-09-30 20:23:28 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.ffado.org/files/${name}.tgz";
|
2014-08-24 14:11:22 +01:00
|
|
|
sha256 = "1ximic90l0av91njb123ra2zp6mg23yg5iz8xa5371cqrn79nacz";
|
2012-04-05 22:53:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
2012-04-08 00:57:30 +01:00
|
|
|
[ dbus dbus_cplusplus expat glibmm libavc1394 libconfig
|
|
|
|
libiec61883 libraw1394 libxmlxx makeWrapper pkgconfig pyqt4
|
|
|
|
python pythonDBus qt4 scons
|
2012-04-05 22:53:42 +01:00
|
|
|
];
|
|
|
|
|
2012-04-08 00:57:30 +01:00
|
|
|
patches = [ ./enable-mixer-and-dbus.patch ];
|
|
|
|
|
2014-08-24 18:50:22 +01:00
|
|
|
# SConstruct checks cpuinfo and an objdump of /bin/mount to determine the appropriate arch
|
|
|
|
# Let's just skip this and tell it which to build
|
|
|
|
postPatch = if stdenv.isi686 then ''
|
|
|
|
sed '/def is_userspace_32bit(cpuinfo):/a\
|
|
|
|
return True' -i SConstruct
|
|
|
|
''
|
|
|
|
else ''
|
|
|
|
sed '/def is_userspace_32bit(cpuinfo):/a\
|
|
|
|
return False' -i SConstruct
|
|
|
|
'';
|
|
|
|
|
2012-04-08 00:57:30 +01:00
|
|
|
# TODO fix ffado-diag, it doesn't seem to use PYPKGDIR
|
2012-09-30 20:23:28 +01:00
|
|
|
buildPhase = ''
|
|
|
|
export PYLIBSUFFIX=lib/${python.libPrefix}/site-packages
|
2012-10-07 21:28:45 +01:00
|
|
|
scons PYPKGDIR=$out/$PYLIBSUFFIX DEBUG=False
|
2012-09-30 20:23:28 +01:00
|
|
|
sed -e "s#/usr/local#$out#" -i support/mixer-qt4/ffado/config.py
|
|
|
|
'';
|
|
|
|
|
2012-04-05 22:53:42 +01:00
|
|
|
installPhase = ''
|
2012-04-08 00:57:30 +01:00
|
|
|
scons PREFIX=$out LIBDIR=$out/lib SHAREDIR=$out/share/libffado \
|
2012-09-30 20:23:28 +01:00
|
|
|
PYPKGDIR=$out/$PYLIBSUFFIX UDEVDIR=$out/lib/udev/rules.d install
|
2012-04-08 00:57:30 +01:00
|
|
|
|
2012-07-15 10:51:49 +01:00
|
|
|
sed -e "s#/usr/local#$out#g" -i $out/bin/ffado-diag
|
|
|
|
|
2012-04-08 00:57:30 +01:00
|
|
|
PYDIR=$out/$PYLIBSUFFIX
|
|
|
|
wrapProgram $out/bin/ffado-mixer --prefix PYTHONPATH : \
|
|
|
|
$PYTHONPATH:$PYDIR:${pyqt4}/$LIBSUFFIX:${pythonDBus}/$LIBSUFFIX:
|
|
|
|
wrapProgram $out/bin/ffado-diag --prefix PYTHONPATH : \
|
|
|
|
$PYTHONPATH:$PYDIR:$out/share/libffado/python:${pyqt4}/$LIBSUFFIX:${pythonDBus}/$LIBSUFFIX:
|
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;
|
|
|
|
maintainers = [ maintainers.goibhniu ];
|
2014-03-16 11:08:26 +00:00
|
|
|
platforms = platforms.linux;
|
2012-04-05 22:53:42 +01:00
|
|
|
};
|
|
|
|
}
|