2014-03-08 18:13:29 +01:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, boost, gnuradio, rtl-sdr, uhd
|
2015-05-10 17:43:17 +02:00
|
|
|
, makeWrapper, hackrf
|
2014-03-08 18:13:29 +01:00
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnuradio-osmosdr-${version}";
|
2014-12-06 15:47:43 +01:00
|
|
|
version = "0.1.4";
|
2014-03-08 18:13:29 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.osmocom.org/gr-osmosdr";
|
|
|
|
rev = "refs/tags/v${version}";
|
2014-12-06 15:47:43 +01:00
|
|
|
sha256 = "0vyzr4fhkblf2v3d7m0ch5hws4c493jw3ydl4y6b2dfbfzchhsz8";
|
2014-03-08 18:13:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2015-05-10 17:43:17 +02:00
|
|
|
cmake pkgconfig boost gnuradio rtl-sdr uhd makeWrapper hackrf
|
2014-03-08 18:13:29 +01:00
|
|
|
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for OsmoSDR and rtl-sdr";
|
|
|
|
homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|