From 36aac433f999a823866f4581ff3f873d5d7f2ee1 Mon Sep 17 00:00:00 2001 From: eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Wed, 4 Jun 2025 19:03:46 +1000 Subject: [PATCH] blackhole: init at 0.6.1 Co-authored-by: yorenapu Co-authored-by: Sandro --- pkgs/by-name/bl/blackhole/package.nix | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/bl/blackhole/package.nix diff --git a/pkgs/by-name/bl/blackhole/package.nix b/pkgs/by-name/bl/blackhole/package.nix new file mode 100644 index 000000000000..b84a1a42b8b1 --- /dev/null +++ b/pkgs/by-name/bl/blackhole/package.nix @@ -0,0 +1,55 @@ +{ + stdenv, + lib, + fetchFromGitHub, + xcbuildHook, + apple-sdk, + nix-update-script, + channel ? "256ch", +}: +stdenv.mkDerivation (finalAttrs: { + pname = "blackhole"; + version = "0.6.1"; + + src = fetchFromGitHub { + owner = "existentialaudio"; + repo = "BlackHole"; + tag = "v${finalAttrs.version}"; + hash = "sha256-jFKi5LJdTOMFa1mErH6WsjgCtLCKzwpgn2+T3Fp9MtQ="; + }; + + nativeBuildInputs = [ + xcbuildHook + ]; + + buildInputs = [ apple-sdk ]; + + bundleId = "audio.existential.BlackHole${channel}"; + xcbuildFlags = [ + "-project" + "BlackHole.xcodeproj" + "-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\\\"" + ]; + + 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 + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Virtual audio driver for macOS"; + homepage = "https://existential.audio/blackhole"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.darwin; + maintainers = with lib.maintainers; [ eveeifyeve ]; + }; +})