2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-03-22 10:45:30 +00:00
|
|
|
, mkDerivation
|
|
|
|
, dbus
|
|
|
|
, dbus_cplusplus
|
|
|
|
, desktop-file-utils
|
|
|
|
, fetchurl
|
2018-12-15 20:40:26 +00:00
|
|
|
, glibmm
|
2020-03-22 10:45:30 +00:00
|
|
|
, kernel
|
|
|
|
, libavc1394
|
|
|
|
, libconfig
|
|
|
|
, libiec61883
|
|
|
|
, libraw1394
|
|
|
|
, libxmlxx3
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-03-22 10:45:30 +00:00
|
|
|
, python3
|
2020-07-17 23:30:28 +00:00
|
|
|
, sconsPackages
|
2020-03-22 10:45:30 +00:00
|
|
|
, which
|
|
|
|
, wrapQtAppsHook
|
2015-04-26 03:14:28 +00:00
|
|
|
}:
|
|
|
|
|
2019-03-03 01:45:04 +00:00
|
|
|
let
|
|
|
|
inherit (python3.pkgs) pyqt5 dbus-python;
|
|
|
|
python = python3.withPackages (pkgs: with pkgs; [ pyqt5 dbus-python ]);
|
2020-03-22 10:45:30 +00:00
|
|
|
in
|
|
|
|
mkDerivation rec {
|
2019-03-03 01:45:04 +00:00
|
|
|
pname = "ffado";
|
2020-06-09 20:04:37 +00:00
|
|
|
version = "2.4.3";
|
2012-04-05 21:53:42 +00:00
|
|
|
|
2012-09-30 19:23:28 +00:00
|
|
|
src = fetchurl {
|
2015-04-26 03:14:28 +00:00
|
|
|
url = "http://www.ffado.org/files/libffado-${version}.tgz";
|
2020-06-09 20:04:37 +00:00
|
|
|
sha256 = "08bygzv1k6ai0572gv66h7gfir5zxd9klfy74z2pxqp6s5hms58r";
|
2012-04-05 21:53:42 +00:00
|
|
|
};
|
|
|
|
|
2020-03-22 10:45:30 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace ./support/tools/ffado-diag.in \
|
2020-03-23 09:03:36 +00:00
|
|
|
--replace /lib/modules/ "/run/booted-system/kernel-modules/lib/modules/"
|
2020-03-22 10:45:30 +00:00
|
|
|
'';
|
|
|
|
|
2019-03-03 01:45:04 +00:00
|
|
|
patches = [
|
|
|
|
# fix installing metainfo file
|
|
|
|
./fix-build.patch
|
|
|
|
];
|
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
outputs = [ "out" "bin" "dev" ];
|
|
|
|
|
2020-03-31 19:32:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
2020-07-17 23:30:28 +00:00
|
|
|
sconsPackages.scons_3_1_2
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-03-31 19:32:15 +00:00
|
|
|
which
|
|
|
|
python
|
|
|
|
pyqt5
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2012-04-05 21:53:42 +00:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
prefixKey = "PREFIX=";
|
|
|
|
sconsFlags = [
|
|
|
|
"DEBUG=False"
|
|
|
|
"ENABLE_ALL=True"
|
2020-03-22 10:45:30 +00:00
|
|
|
"BUILD_TESTS=True"
|
2018-12-15 20:40:26 +00:00
|
|
|
"WILL_DEAL_WITH_XDG_MYSELF=True"
|
|
|
|
"BUILD_MIXER=True"
|
2019-03-03 01:45:04 +00:00
|
|
|
"UDEVDIR=${placeholder "out"}/lib/udev/rules.d"
|
|
|
|
"PYPKGDIR=${placeholder "out"}/${python3.sitePackages}"
|
|
|
|
"BINDIR=${placeholder "bin"}/bin"
|
|
|
|
"INCLUDEDIR=${placeholder "dev"}/include"
|
|
|
|
"PYTHON_INTERPRETER=${python.interpreter}"
|
2015-04-26 03:14:28 +00:00
|
|
|
];
|
2012-04-07 23:57:30 +00:00
|
|
|
|
2018-12-15 20:40:26 +00:00
|
|
|
buildInputs = [
|
2019-03-03 01:45:04 +00:00
|
|
|
dbus
|
|
|
|
dbus_cplusplus
|
2020-03-22 10:45:30 +00:00
|
|
|
glibmm
|
|
|
|
libavc1394
|
|
|
|
libconfig
|
|
|
|
libiec61883
|
|
|
|
libraw1394
|
2019-03-03 01:45:04 +00:00
|
|
|
libxmlxx3
|
|
|
|
python
|
2018-12-15 20:40:26 +00:00
|
|
|
];
|
2012-09-30 19:23:28 +00:00
|
|
|
|
2019-03-03 01:45:04 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-03-22 10:45:30 +00:00
|
|
|
dontWrapQtApps = true;
|
2012-04-05 21:53:42 +00:00
|
|
|
|
2019-06-18 00:37:27 +00:00
|
|
|
postInstall = ''
|
2020-03-22 10:45:30 +00:00
|
|
|
desktop="$bin/share/applications/ffado-mixer.desktop"
|
|
|
|
install -DT -m 444 support/xdg/ffado.org-ffadomixer.desktop $desktop
|
|
|
|
substituteInPlace "$desktop" \
|
|
|
|
--replace Exec=ffado-mixer "Exec=$bin/bin/ffado-mixer" \
|
|
|
|
--replace hi64-apps-ffado ffado-mixer
|
|
|
|
install -DT -m 444 support/xdg/hi64-apps-ffado.png "$bin/share/icons/hicolor/64x64/apps/ffado-mixer.png"
|
|
|
|
|
2019-06-18 00:37:27 +00:00
|
|
|
# prevent build tools from leaking into closure
|
|
|
|
echo 'See `nix-store --query --tree ${placeholder "out"}`.' > $out/lib/libffado/static_info.txt
|
|
|
|
'';
|
|
|
|
|
2020-03-22 10:45:30 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapQtApp $bin/bin/ffado-mixer
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-30 03:16:53 +00:00
|
|
|
homepage = "http://www.ffado.org";
|
2012-04-07 23:57:30 +00:00
|
|
|
description = "FireWire audio drivers";
|
2012-04-05 21:53:42 +00:00
|
|
|
license = licenses.gpl3;
|
2020-03-22 10:45:30 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu michojel ];
|
2014-03-16 11:08:26 +00:00
|
|
|
platforms = platforms.linux;
|
2012-04-05 21:53:42 +00:00
|
|
|
};
|
|
|
|
}
|