at 23.11-beta 108 lines 2.4 kB view raw
1{ lib 2, mkDerivation 3, dbus 4, dbus_cplusplus 5, desktop-file-utils 6, fetchurl 7, glibmm 8, kernel 9, libavc1394 10, libconfig 11, libiec61883 12, libraw1394 13, libxmlxx3 14, pkg-config 15, python3 16, scons 17, which 18, wrapQtAppsHook 19}: 20 21let 22 inherit (python3.pkgs) pyqt5 dbus-python; 23 python = python3.withPackages (pkgs: with pkgs; [ pyqt5 dbus-python ]); 24in 25mkDerivation rec { 26 pname = "ffado"; 27 version = "2.4.7"; 28 29 src = fetchurl { 30 url = "http://www.ffado.org/files/libffado-${version}.tgz"; 31 sha256 = "0vsn3y52g6f77lqh9qfkd7dslmb7bbgy46cv5idynx4frqscc23s"; 32 }; 33 34 prePatch = '' 35 substituteInPlace ./support/tools/ffado-diag.in \ 36 --replace /lib/modules/ "/run/booted-system/kernel-modules/lib/modules/" 37 ''; 38 39 patches = [ 40 # fix installing metainfo file 41 ./fix-build.patch 42 ]; 43 44 outputs = [ "out" "bin" "dev" ]; 45 46 nativeBuildInputs = [ 47 desktop-file-utils 48 scons 49 pkg-config 50 which 51 python 52 pyqt5 53 wrapQtAppsHook 54 ]; 55 56 prefixKey = "PREFIX="; 57 sconsFlags = [ 58 "DEBUG=False" 59 "ENABLE_ALL=True" 60 "BUILD_TESTS=True" 61 "WILL_DEAL_WITH_XDG_MYSELF=True" 62 "BUILD_MIXER=True" 63 "UDEVDIR=${placeholder "out"}/lib/udev/rules.d" 64 "PYPKGDIR=${placeholder "out"}/${python3.sitePackages}" 65 "BINDIR=${placeholder "bin"}/bin" 66 "INCLUDEDIR=${placeholder "dev"}/include" 67 "PYTHON_INTERPRETER=${python.interpreter}" 68 ]; 69 70 buildInputs = [ 71 dbus 72 dbus_cplusplus 73 glibmm 74 libavc1394 75 libconfig 76 libiec61883 77 libraw1394 78 libxmlxx3 79 python 80 ]; 81 82 enableParallelBuilding = true; 83 dontWrapQtApps = true; 84 85 postInstall = '' 86 desktop="$bin/share/applications/ffado-mixer.desktop" 87 install -DT -m 444 support/xdg/ffado.org-ffadomixer.desktop $desktop 88 substituteInPlace "$desktop" \ 89 --replace Exec=ffado-mixer "Exec=$bin/bin/ffado-mixer" \ 90 --replace hi64-apps-ffado ffado-mixer 91 install -DT -m 444 support/xdg/hi64-apps-ffado.png "$bin/share/icons/hicolor/64x64/apps/ffado-mixer.png" 92 93 # prevent build tools from leaking into closure 94 echo 'See `nix-store --query --tree ${placeholder "out"}`.' > $out/lib/libffado/static_info.txt 95 ''; 96 97 preFixup = '' 98 wrapQtApp $bin/bin/ffado-mixer 99 ''; 100 101 meta = with lib; { 102 homepage = "http://www.ffado.org"; 103 description = "FireWire audio drivers"; 104 license = licenses.gpl3; 105 maintainers = with maintainers; [ goibhniu michojel ]; 106 platforms = platforms.linux; 107 }; 108}