2013-05-02 11:44:36 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
# core dependencies
|
|
|
|
, cmake, pkgconfig, git, boost, cppunit, fftw
|
|
|
|
# python wrappers
|
|
|
|
, python, swig2, numpy, scipy, matplotlib
|
|
|
|
# grc - the gnu radio companion
|
2016-10-18 16:53:31 +01:00
|
|
|
, cheetah, pygtk
|
2013-05-02 11:44:36 +01:00
|
|
|
# gr-wavelet: collection of wavelet blocks
|
|
|
|
, gsl
|
|
|
|
# gr-qtgui: the Qt-based GUI
|
|
|
|
, qt4, qwt, pyqt4 #, pyqwt
|
|
|
|
# gr-wxgui: the Wx-based GUI
|
|
|
|
, wxPython, lxml
|
|
|
|
# gr-audio: audio subsystems (system/OS dependent)
|
|
|
|
, alsaLib
|
|
|
|
# uhd: the Ettus USRP Hardware Driver Interface
|
|
|
|
, uhd
|
|
|
|
# gr-video-sdl: PAL and NTSC display
|
|
|
|
, SDL
|
|
|
|
, libusb1, orc, pyopengl
|
2014-01-02 16:53:57 +00:00
|
|
|
, makeWrapper
|
|
|
|
}:
|
2013-05-02 11:44:36 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnuradio-${version}";
|
2017-06-20 02:39:54 +01:00
|
|
|
version = "3.7.11";
|
2013-05-02 11:44:36 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-06-20 02:39:54 +01:00
|
|
|
url = "https://gnuradio.org/releases/gnuradio/${name}.tar.gz";
|
|
|
|
sha256 = "1m2jf8lafr6pr2dlm40nbvr6az8gwjfkzpbs4fxzv3l5hcqvmnc7";
|
2013-05-02 11:44:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2014-10-01 20:55:40 +01:00
|
|
|
cmake pkgconfig git boost cppunit fftw python swig2 orc lxml qt4
|
2014-09-19 18:56:08 +01:00
|
|
|
qwt alsaLib SDL libusb1 uhd gsl makeWrapper
|
2013-05-02 11:44:36 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2016-10-18 16:53:31 +01:00
|
|
|
cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl
|
2013-05-02 11:44:36 +01:00
|
|
|
];
|
|
|
|
|
2016-03-22 00:16:53 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-05-02 11:44:36 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# - Ensure we get an interactive backend for matplotlib. If not the gr_plot_*
|
|
|
|
# programs will not display anything. Yes, $MATPLOTLIBRC must point to the
|
|
|
|
# *dirname* where matplotlibrc is located, not the file itself.
|
|
|
|
# - GNU Radio core is C++ but the user interface (GUI and API) is Python, so
|
|
|
|
# we must wrap the stuff in bin/.
|
|
|
|
postInstall = ''
|
|
|
|
printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc"
|
|
|
|
|
2017-08-10 02:36:10 +01:00
|
|
|
for file in $(find $out/bin $out/share/gnuradio/examples -type f -executable); do
|
2013-05-02 11:44:36 +01:00
|
|
|
wrapProgram "$file" \
|
2014-03-09 21:29:42 +00:00
|
|
|
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
|
2013-05-02 11:44:36 +01:00
|
|
|
--set MATPLOTLIBRC "$out/share/gnuradio"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Software Defined Radio (SDR) software";
|
|
|
|
longDescription = ''
|
|
|
|
GNU Radio is a free & open-source software development toolkit that
|
|
|
|
provides signal processing blocks to implement software radios. It can be
|
|
|
|
used with readily-available low-cost external RF hardware to create
|
|
|
|
software-defined radios, or without hardware in a simulation-like
|
|
|
|
environment. It is widely used in hobbyist, academic and commercial
|
|
|
|
environments to support both wireless communications research and
|
|
|
|
real-world radio systems.
|
|
|
|
'';
|
2017-06-20 02:39:54 +01:00
|
|
|
homepage = https://www.gnuradio.org;
|
2013-05-02 11:44:36 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2016-03-22 00:16:53 +00:00
|
|
|
maintainers = with maintainers; [ bjornfor fpletz ];
|
2013-05-02 11:44:36 +01:00
|
|
|
};
|
|
|
|
}
|