2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchgit, cmake, pkg-config, makeWrapper
|
2019-01-08 11:06:54 +00:00
|
|
|
, 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
|
2020-10-06 00:27:00 +01:00
|
|
|
, log4cpp
|
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
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
2014-03-08 17:13:29 +00:00
|
|
|
buildInputs = [
|
2020-12-31 07:48:55 +00:00
|
|
|
boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd
|
2021-01-15 05:42:41 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
|
|
|
|
++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ];
|
2014-03-08 17:13:29 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-03-08 17:13:29 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|