From 0a5599cda2cd2c442c27bc37d36826956245f2ab Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 30 Jun 2024 17:41:39 +0200 Subject: [PATCH 1/3] =?UTF-8?q?ffado:=202.4.8=20=E2=86=92=202.4.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://ffado.org/posts/ffado-2.4.9-release/ --- pkgs/os-specific/linux/ffado/default.nix | 26 ++---------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 3c13b9604059..8c835fdaf14e 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, @@ -31,7 +30,7 @@ let in mkDerivation rec { pname = "ffado"; - version = "2.4.8"; + version = "2.4.9"; outputs = [ "out" @@ -41,7 +40,7 @@ mkDerivation rec { src = fetchurl { url = "http://www.ffado.org/files/libffado-${version}.tgz"; - hash = "sha256-0iFXYyGctOoHCdc232Ud80/wV81tiS7ItiS0uLKyq2Y="; + hash = "sha256-xELFL60Ryv1VE7tOhGyFHxAchIT4karFRe0ZDo/U0Q8="; }; prePatch = '' @@ -49,20 +48,7 @@ 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 @@ -76,7 +62,6 @@ mkDerivation rec { "DEBUG=False" "ENABLE_ALL=True" "BUILD_TESTS=True" - "WILL_DEAL_WITH_XDG_MYSELF=True" "BUILD_MIXER=True" "UDEVDIR=${placeholder "out"}/lib/udev/rules.d" "PYPKGDIR=${placeholder "out"}/${python.sitePackages}" @@ -105,13 +90,6 @@ 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 ''; From f94db72728355b347c71d1823f232b01c93685ac Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 22 Apr 2024 19:56:59 +0200 Subject: [PATCH 2/3] ffado: Remove Qt dependency This slims up `pipewire` closure. The full package is available as `ffado-mixer`. --- pkgs/os-specific/linux/ffado/default.nix | 42 ++++++++++++++---------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 8c835fdaf14e..34bb094bfae8 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -17,16 +17,21 @@ 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"; @@ -48,21 +53,24 @@ mkDerivation rec { --replace /lib/modules/ "/run/booted-system/kernel-modules/lib/modules/" ''; - nativeBuildInputs = [ - (scons.override { python3Packages = python311.pkgs; }) - pkg-config - which - python - python.pkgs.pyqt5 - wrapQtAppsHook - ]; + nativeBuildInputs = + [ + (scons.override { 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" - "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" @@ -94,8 +102,8 @@ mkDerivation rec { 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 d559a0aee7b3..ecd17071b342 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26850,6 +26850,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 { }; From 45c85e2b1d6d3a26b9bc846e0146b1d6f498000c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 6 Jul 2024 16:56:12 +0200 Subject: [PATCH 3/3] ffado: Add comment about Python 3.11 override This was introduced in 20001b719e1927d687c4909cf522e64cb93379e1 --- pkgs/os-specific/linux/ffado/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 34bb094bfae8..207e0a6fe30d 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -55,7 +55,10 @@ mkDerivation rec { nativeBuildInputs = [ - (scons.override { python3Packages = python311.pkgs; }) + (scons.override { + # SConstruct script depends on distutils removed in Python 3.12 + python3Packages = python311.pkgs; + }) pkg-config which ]