2019-01-08 12:06:54 +01:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, makeWrapper
|
|
|
|
, boost
|
2014-03-08 18:13:29 +01:00
|
|
|
, pythonSupport ? true, python, swig
|
2019-01-08 12:06:54 +01:00
|
|
|
, airspy
|
|
|
|
, gnuradio
|
|
|
|
, hackrf
|
|
|
|
, libbladeRF
|
|
|
|
, rtl-sdr
|
|
|
|
, soapysdr-with-plugins
|
|
|
|
, uhd
|
2014-03-08 18:13:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnuradio-osmosdr-${version}";
|
2019-01-08 12:06:54 +01:00
|
|
|
version = "2018-08-15";
|
2014-03-08 18:13:29 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.osmocom.org/gr-osmosdr";
|
2019-01-08 12:06:54 +01:00
|
|
|
rev = "4d83c6067f059b0c5015c3f59f8117bbd361e877";
|
|
|
|
sha256 = "1d5nb47506qry52bg4cn02d3l4lwxwz44g2fz1ph0q93c7892j60";
|
2014-03-08 18:13:29 +01:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-03-08 18:13:29 +01:00
|
|
|
buildInputs = [
|
2019-01-08 12:06:54 +01:00
|
|
|
cmake makeWrapper boost
|
|
|
|
airspy gnuradio hackrf libbladeRF rtl-sdr uhd
|
|
|
|
] ++ stdenv.lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
|
|
|
|
++ stdenv.lib.optionals pythonSupport [ python swig ];
|
2014-03-08 18:13:29 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-07-15 02:27:30 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-03-08 18:13:29 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for OsmoSDR and rtl-sdr";
|
2017-07-15 02:28:13 +02:00
|
|
|
homepage = https://sdr.osmocom.org/trac/wiki/GrOsmoSDR;
|
2014-03-08 18:13:29 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2017-07-15 02:26:42 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2015-07-27 13:02:12 +02:00
|
|
|
maintainers = with maintainers; [ bjornfor the-kenny ];
|
2014-03-08 18:13:29 +01:00
|
|
|
};
|
|
|
|
}
|