9 stdenv.mkDerivation rec {
10 pname = "switchaudio-osx";
13 src = fetchFromGitHub {
15 repo = "switchaudio-osx";
17 hash = "sha256-AZJn5kHK/al94ONfIHcG+W0jyMfgdJkIngN+PVj+I44=";
20 buildInputs = [ xcodebuild ];
22 nativeBuildInputs = [ xcbuildHook ];
25 # Patch to fix running on earlier version of macOS
26 # https://github.com/deweller/switchaudio-osx/pull/65
27 ./001-macos-legacy-support.patch
33 # for some reason binary is located in Products/ rather than in build/
34 install -Dm755 Products/Release/SwitchAudioSource $out/bin/SwitchAudioSource
40 description = "Command-line utility to manage audio input/output devices on macOS";
41 homepage = "https://github.com/deweller/switchaudio-osx";
42 mainProgram = "SwitchAudioSource";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ taranarmo ];
45 platforms = lib.platforms.darwin;