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;
|
|
|
|
|
2019-12-24 01:40:04 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gr-osmosdr";
|
2019-12-24 01:40:04 +01:00
|
|
|
version = "0.1.5";
|
2014-03-08 18:13:29 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.osmocom.org/gr-osmosdr";
|
2019-12-24 01:40:04 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
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
|
|
|
};
|
|
|
|
}
|