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;
|
|
|
|
|
2019-12-24 00:40:04 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gr-osmosdr";
|
2019-12-24 00:40:04 +00:00
|
|
|
version = "0.1.5";
|
2014-03-08 17:13:29 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.osmocom.org/gr-osmosdr";
|
2019-12-24 00:40:04 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
2014-03-08 17:13:29 +00:00
|
|
|
};
|
|
|
|
|
2017-09-14 20:24:37 +01: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 01:27:30 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-03-08 17:13:29 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for OsmoSDR and rtl-sdr";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR";
|
2014-03-08 17:13:29 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2017-07-15 01:26:42 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-05-09 10:25:07 +01:00
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
2014-03-08 17:13:29 +00:00
|
|
|
};
|
|
|
|
}
|