From 8ebf5dad522fcd36815fcbd3892d27084ce070d9 Mon Sep 17 00:00:00 2001 From: Tommy Chiang Date: Tue, 14 Jul 2026 04:23:21 +0800 Subject: [PATCH] blackhole: 0.6.1 -> 0.7.1 Add kNumber_Of_Channels preprocessor definition so the driver uses the correct number of audio channels matching the channel parameter, instead of always defaulting to 2. Changelog: https://github.com/ExistentialAudio/BlackHole/releases/tag/v0.7.1 Assisted-by: opencode/deepseek-v4-pro --- pkgs/by-name/bl/blackhole/package.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/bl/blackhole/package.nix b/pkgs/by-name/bl/blackhole/package.nix index b84a1a42b8b1..fa3f1a861c34 100644 --- a/pkgs/by-name/bl/blackhole/package.nix +++ b/pkgs/by-name/bl/blackhole/package.nix @@ -7,15 +7,18 @@ nix-update-script, channel ? "256ch", }: +let + numChannels = lib.toIntBase10 (lib.removeSuffix "ch" channel); +in stdenv.mkDerivation (finalAttrs: { pname = "blackhole"; - version = "0.6.1"; + version = "0.7.1"; src = fetchFromGitHub { owner = "existentialaudio"; repo = "BlackHole"; tag = "v${finalAttrs.version}"; - hash = "sha256-jFKi5LJdTOMFa1mErH6WsjgCtLCKzwpgn2+T3Fp9MtQ="; + hash = "sha256-kuIaoXA0K7SFPXKFHqcilTbf1zn9Ol3JYVpnkFuQEZg="; }; nativeBuildInputs = [ @@ -31,14 +34,14 @@ stdenv.mkDerivation (finalAttrs: { "-configuration" "Release" "PRODUCT_BUNDLE_IDENTIFIER=${finalAttrs.bundleId}" - "GCC_PREPROCESSOR_DEFINITIONS=$GCC_PREPROCESSOR_DEFINITIONS kDriver_Name=\\\"blackhole${channel}\\\" kPlugIn_BundleID=\\\"${finalAttrs.bundleId}\\\" kPlugIn_Icon=\\\"BlackHole.icns\\\"" + "GCC_PREPROCESSOR_DEFINITIONS=$GCC_PREPROCESSOR_DEFINITIONS kNumber_Of_Channels=${toString numChannels} kDriver_Name=\\\"BlackHole\\\" kPlugIn_BundleID=\\\"${finalAttrs.bundleId}\\\" kPlugIn_Icon=\\\"BlackHole.icns\\\"" ]; installPhase = '' runHook preInstall mkdir -p $out/Library/Audio/Plug-Ins/HAL - mv Products/Release/BlackHole.driver $out/Library/Audio/Plug-Ins/HAL/Blackhole${channel}.driver + mv Products/Release/BlackHole.driver $out/Library/Audio/Plug-Ins/HAL/BlackHole${channel}.driver runHook postInstall '';