From 3cc74c3a7c2857f4bd09a08864f662a5794a7069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20J=C3=A4rvel=C3=A4?= Date: Mon, 18 Mar 2019 20:17:40 +0200 Subject: [PATCH] Add CoreAudio to sox on macOS Otherwise no audio devices are available for recording and playback on macOS. --- pkgs/applications/misc/audio/sox/default.nix | 5 +++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/audio/sox/default.nix b/pkgs/applications/misc/audio/sox/default.nix index 878e62c68cbf..a598ec1caca1 100644 --- a/pkgs/applications/misc/audio/sox/default.nix +++ b/pkgs/applications/misc/audio/sox/default.nix @@ -1,4 +1,4 @@ -{ config, lib, stdenv, fetchurl +{ config, lib, stdenv, fetchurl, CoreAudio , enableAlsa ? true, alsaLib ? null , enableLibao ? true, libao ? null , enableLame ? config.sox.enableLame or false, lame ? null @@ -32,7 +32,8 @@ stdenv.mkDerivation rec { optional enablePNG libpng ++ optional enableLibsndfile libsndfile ++ optionals enableAMR [ amrnb amrwb ] ++ - optional enableLibpulseaudio libpulseaudio; + optional enableLibpulseaudio libpulseaudio ++ + optional (stdenv.isDarwin) CoreAudio; meta = { description = "Sample Rate Converter for audio"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 523fff75f04f..759986f2ff5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19517,7 +19517,9 @@ in soulseekqt = libsForQt5.callPackage ../applications/networking/p2p/soulseekqt { }; - sox = callPackage ../applications/misc/audio/sox { }; + sox = callPackage ../applications/misc/audio/sox { + inherit (darwin.apple_sdk.frameworks) CoreAudio; + }; soxr = callPackage ../applications/misc/audio/soxr { };