2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
2021-06-28 23:13:55 +00:00
|
|
|
, hamlib, rtaudio, alsa-lib, libpulseaudio, libjack2, libusb1, soapysdr
|
2022-10-21 18:38:19 +00:00
|
|
|
, Accelerate, CoreAudio
|
2020-12-25 13:55:36 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "soapyaudio";
|
|
|
|
version = "0.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pothosware";
|
|
|
|
repo = "SoapyAudio";
|
|
|
|
rev = "soapy-audio-${version}";
|
|
|
|
sha256 = "0minlsc1lvmqm20vn5hb4im7pz8qwklfy7sbr2xr73xkrbqdahc0";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ hamlib rtaudio libjack2 libusb1 soapysdr ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Accelerate CoreAudio ];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/"
|
|
|
|
"-DUSE_HAMLIB=ON"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://github.com/pothosware/SoapyAudio";
|
|
|
|
description = "SoapySDR plugin for amateur radio and audio devices";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ numinit ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = platforms.unix;
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
}
|