diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 3c13b9604059..207e0a6fe30d 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -7,7 +7,6 @@ dbus_cplusplus, desktop-file-utils, fetchurl, - fetchpatch, glibmm, libavc1394, libconfig, @@ -18,20 +17,25 @@ python311, scons, which, + withMixer ? false, wrapQtAppsHook, }: let - python = python311.withPackages ( - pkgs: with pkgs; [ - pyqt5 - dbus-python - ] - ); + python = + if withMixer then + python311.withPackages ( + pkgs: with pkgs; [ + pyqt5 + dbus-python + ] + ) + else + python311; in mkDerivation rec { pname = "ffado"; - version = "2.4.8"; + version = "2.4.9"; outputs = [ "out" @@ -41,7 +45,7 @@ mkDerivation rec { src = fetchurl { url = "http://www.ffado.org/files/libffado-${version}.tgz"; - hash = "sha256-0iFXYyGctOoHCdc232Ud80/wV81tiS7ItiS0uLKyq2Y="; + hash = "sha256-xELFL60Ryv1VE7tOhGyFHxAchIT4karFRe0ZDo/U0Q8="; }; prePatch = '' @@ -49,35 +53,27 @@ mkDerivation rec { --replace /lib/modules/ "/run/booted-system/kernel-modules/lib/modules/" ''; - patches = [ - # fix installing metainfo file - ./fix-build.patch - - (fetchpatch { - name = "musl.patch"; - url = "http://subversion.ffado.org/changeset?format=diff&new=2846&old=2845"; - stripLen = 2; - hash = "sha256-iWeYnb5J69Uvo1lftc7MWg7WrLa+CGZyOwJPOe8/PKg="; - }) - ]; - - nativeBuildInputs = [ - desktop-file-utils - (scons.override { python3Packages = python311.pkgs; }) - pkg-config - which - python - python.pkgs.pyqt5 - wrapQtAppsHook - ]; + nativeBuildInputs = + [ + (scons.override { + # SConstruct script depends on distutils removed in Python 3.12 + python3Packages = python311.pkgs; + }) + pkg-config + which + ] + ++ lib.optionals withMixer [ + python + python.pkgs.pyqt5 + wrapQtAppsHook + ]; prefixKey = "PREFIX="; sconsFlags = [ "DEBUG=False" "ENABLE_ALL=True" "BUILD_TESTS=True" - "WILL_DEAL_WITH_XDG_MYSELF=True" - "BUILD_MIXER=True" + "BUILD_MIXER=${if withMixer then "True" else "False"}" "UDEVDIR=${placeholder "out"}/lib/udev/rules.d" "PYPKGDIR=${placeholder "out"}/${python.sitePackages}" "BINDIR=${placeholder "bin"}/bin" @@ -105,19 +101,12 @@ mkDerivation rec { dontWrapQtApps = true; postInstall = '' - 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" - # prevent build tools from leaking into closure echo 'See `nix-store --query --tree ${placeholder "out"}`.' > $out/lib/libffado/static_info.txt ''; - preFixup = '' - wrapQtApp $bin/bin/ffado-mixer + preFixup = lib.optionalString withMixer '' + wrapQtApp "$bin/bin/ffado-mixer" ''; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68d7eef8e1d9..b280d8007a7c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26831,6 +26831,7 @@ with pkgs; fatrace = callPackage ../os-specific/linux/fatrace { }; ffado = libsForQt5.callPackage ../os-specific/linux/ffado { }; + ffado-mixer = libsForQt5.callPackage ../os-specific/linux/ffado { withMixer = true; }; libffado = ffado; fbterm = callPackage ../os-specific/linux/fbterm { };