about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/radio/soapyuhd/default.nix
blob: 6ed88e0431e37eb5fee0dc65c74cfe65173e6793 (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
32
33
34
{ stdenv, fetchFromGitHub, cmake, pkgconfig
, uhd, boost, soapysdr
} :

let
  version = "0.3.6";

in stdenv.mkDerivation {
  name = "soapyuhd-${version}";

  src = fetchFromGitHub {
    owner = "pothosware";
    repo = "SoapyUHD";
    rev = "soapy-uhd-${version}";
    sha256 = "11kp5iv21k8lqwjjydzqmcxdgpm6yicw6d3jhzvcvwcavd41crs7";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ uhd boost soapysdr ];

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

  postPatch = ''
    sed -i "s:DESTINATION .*uhd/modules:DESTINATION $out/lib/uhd/modules:" CMakeLists.txt
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/pothosware/SoapyAirspy;
    description = "SoapySDR plugin for UHD devices";
    license = licenses.gpl3;
    maintainers = with maintainers; [ markuskowa ];
    platforms = platforms.linux;
  };
}