anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / radio / soapyaudio / default.nix
blob86921754d6b64ee582a95d72cee9c366e0832b55
1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config
2 , hamlib, rtaudio, alsa-lib, libpulseaudio, libjack2, libusb1, soapysdr
3 , Accelerate, CoreAudio
4 } :
6 stdenv.mkDerivation rec {
7   pname = "soapyaudio";
8   version = "0.1.1";
10   src = fetchFromGitHub {
11     owner = "pothosware";
12     repo = "SoapyAudio";
13     rev = "soapy-audio-${version}";
14     sha256 = "0minlsc1lvmqm20vn5hb4im7pz8qwklfy7sbr2xr73xkrbqdahc0";
15   };
17   nativeBuildInputs = [ cmake pkg-config ];
18   buildInputs = [ hamlib rtaudio libjack2 libusb1 soapysdr ]
19     ++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib libpulseaudio ]
20     ++ lib.optionals stdenv.hostPlatform.isDarwin [ Accelerate CoreAudio ];
22   cmakeFlags = [
23     "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/"
24     "-DUSE_HAMLIB=ON"
25   ];
27   meta = with lib; {
28     homepage = "https://github.com/pothosware/SoapyAudio";
29     description = "SoapySDR plugin for amateur radio and audio devices";
30     license = licenses.mit;
31     maintainers = with maintainers; [ numinit ];
32     platforms = platforms.unix;
33   };