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