2014-03-08 17:13:29 +00:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, boost, gnuradio, rtl-sdr, uhd
|
2015-05-10 16:43:17 +01:00
|
|
|
, makeWrapper, hackrf
|
2014-03-08 17:13:29 +00:00
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnuradio-osmosdr-${version}";
|
2014-12-06 14:47:43 +00:00
|
|
|
version = "0.1.4";
|
2014-03-08 17:13:29 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.osmocom.org/gr-osmosdr";
|
|
|
|
rev = "refs/tags/v${version}";
|
2014-12-06 14:47:43 +00:00
|
|
|
sha256 = "0vyzr4fhkblf2v3d7m0ch5hws4c493jw3ydl4y6b2dfbfzchhsz8";
|
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 = [
|
2017-09-14 20:24:37 +01:00
|
|
|
cmake boost gnuradio rtl-sdr uhd makeWrapper hackrf
|
2014-03-08 17:13:29 +00:00
|
|
|
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
|
|
|
|
|
|
|
|
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";
|
2017-07-15 01:28:13 +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;
|
2015-07-27 12:02:12 +01:00
|
|
|
maintainers = with maintainers; [ bjornfor the-kenny ];
|
2014-03-08 17:13:29 +00:00
|
|
|
};
|
|
|
|
}
|