summary refs log tree commit diff
path: root/pkgs/applications/radio/soapyrtlsdr/default.nix
blob: 8f342190ba7e1933ea727434baf825bc179bf98d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchFromGitHub, cmake, pkgconfig
, rtl-sdr, soapysdr
} :

let
  version = "0.3.0";

in stdenv.mkDerivation {
  pname = "soapyrtlsdr";
  inherit version;

  src = fetchFromGitHub {
    owner = "pothosware";
    repo = "SoapyRTLSDR";
    rev = "soapy-rtlsdr-${version}";
    sha256 = "15j0s7apbg9cjr6rcbr058kl0r3szwzf00ixcbykxb77fh7c6r9w";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ rtl-sdr soapysdr ];

  cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ];

  meta = with stdenv.lib; {
    homepage = "https://github.com/pothosware/SoapyRTLSDR";
    description = "SoapySDR plugin for RTL-SDR devices";
    license = licenses.mit;
    maintainers = with maintainers; [ ragge ];
    platforms = platforms.linux;
  };
}