Merge pull request #106599 from doronbehar/pkg/gnuradio/pkgs

This commit is contained in:
Doron Behar 2021-03-13 17:27:40 +00:00 committed by GitHub
commit 5e367ecef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 1294 additions and 545 deletions

View file

@ -36,7 +36,17 @@
now point to an externally wrapped by default derivations, that allow you to now point to an externally wrapped by default derivations, that allow you to
also add `extraPythonPackages` to the Python interpreter used by GNURadio. also add `extraPythonPackages` to the Python interpreter used by GNURadio.
Missing environmental variables needed for operational GUI were also added Missing environmental variables needed for operational GUI were also added
(<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#7547</link>). (<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#75478</link>).
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://www.gnuradio.org/">GNURadio</link> has a
<code>pkgs</code> attribute set, and there's a <code>gnuradio.callPackage</code>
function that extends <code>pkgs</code> with a <code>mkDerivation</code>, and a
<code>mkDerivationWith</code>, like Qt5. Now all <code>gnuradio.pkgs</code> are
defined with <code>gnuradio.callPackage</code> and some packages that depend
on gnuradio are defined with this as well.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>

View file

@ -1,15 +1,16 @@
{ lib, stdenv, fetchFromGitHub { lib
, fetchFromGitHub
, armadillo , armadillo
, boost
, cmake , cmake
, gmp
, glog , glog
, gmock , gmock
, openssl , openssl
, gflags , gflags
, gnuradio , gnuradio3_8
, libpcap
, orc , orc
, pkg-config , pkg-config
, pythonPackages
, uhd , uhd
, log4cpp , log4cpp
, blas, lapack , blas, lapack
@ -18,7 +19,7 @@
, protobuf , protobuf
}: }:
stdenv.mkDerivation rec { gnuradio3_8.pkgs.mkDerivation rec {
pname = "gnss-sdr"; pname = "gnss-sdr";
version = "0.0.13"; version = "0.0.13";
@ -29,27 +30,32 @@ stdenv.mkDerivation rec {
sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby"; sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby";
}; };
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [
cmake
gnuradio3_8.unwrapped.python
gnuradio3_8.unwrapped.python.pkgs.Mako
gnuradio3_8.unwrapped.python.pkgs.six
];
buildInputs = [ buildInputs = [
gmp
armadillo armadillo
boost.dev gnuradio3_8.unwrapped.boost
glog glog
gmock gmock
openssl.dev openssl
gflags gflags
gnuradio
orc orc
pythonPackages.Mako
pythonPackages.six
# UHD support is optional, but gnuradio is built with it, so there's # UHD support is optional, but gnuradio is built with it, so there's
# nothing to be gained by leaving it out. # nothing to be gained by leaving it out.
uhd gnuradio3_8.unwrapped.uhd
log4cpp log4cpp
blas lapack blas lapack
matio matio
pugixml pugixml
protobuf protobuf
gnuradio3_8.pkgs.osmosdr
libpcap
]; ];
cmakeFlags = [ cmakeFlags = [

View file

@ -5,6 +5,7 @@
# Remove gcc and python references # Remove gcc and python references
, removeReferencesTo , removeReferencesTo
, pkg-config , pkg-config
, volk
, cppunit , cppunit
, swig , swig
, orc , orc
@ -43,11 +44,12 @@
minor = "14"; minor = "14";
patch = "0"; patch = "0";
} }
, fetchSubmodules ? true # We use our build of volk and not the one bundled with the release
, fetchSubmodules ? false
}: }:
let let
sourceSha256 = "1nh4f9dmygprlbqybd3j1byg9fsr6065n140mvc4b0v8qqygmhrc"; sourceSha256 = "BiUDibXV/5cEYmAAaIxT4WTxF/ni4MJumF5oJ/vuOyc=";
featuresInfo = { featuresInfo = {
# Needed always # Needed always
basic = { basic = {
@ -61,6 +63,9 @@ let
}; };
volk = { volk = {
cmakeEnableFlag = "VOLK"; cmakeEnableFlag = "VOLK";
runtime = [
volk
];
}; };
doxygen = { doxygen = {
native = [ doxygen ]; native = [ doxygen ];
@ -213,19 +218,29 @@ let
qt = qt4; qt = qt4;
gtk = gtk2; gtk = gtk2;
}); });
inherit (shared) hasFeature; # function
in
stdenv.mkDerivation rec {
inherit pname;
inherit (shared) inherit (shared)
version version
src src
hasFeature # function
nativeBuildInputs nativeBuildInputs
buildInputs buildInputs
disallowedReferences disallowedReferences
postInstall postInstall
passthru
doCheck doCheck
dontWrapPythonPrograms dontWrapPythonPrograms
meta meta
; ;
passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk;
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
inherit uhd;
};
cmakeFlags = shared.cmakeFlags cmakeFlags = shared.cmakeFlags
# From some reason, if these are not set, libcodec2 and gsm are # From some reason, if these are not set, libcodec2 and gsm are
# not detected properly (slightly different then what's in # not detected properly (slightly different then what's in
@ -236,6 +251,9 @@ let
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so" "-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
"-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm" "-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm"
] ]
++ lib.optionals (hasFeature "volk" features && volk != null) [
"-DENABLE_INTERNAL_VOLK=OFF"
]
; ;
stripDebugList = shared.stripDebugList stripDebugList = shared.stripDebugList
# gr-fcd feature was dropped in 3.8 # gr-fcd feature was dropped in 3.8
@ -250,15 +268,6 @@ let
+ lib.optionalString (hasFeature "gnuradio-companion" features) '' + lib.optionalString (hasFeature "gnuradio-companion" features) ''
sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt
'' ''
# If python-support is disabled, don't install volk's (git submodule)
# volk_modtool - it references python.
#
# NOTE: The same is done for 3.8, but we don't put this string in
# ./shared.nix since on the next release of 3.8 it won't be needed there,
# but it will be needed for 3.7, probably for ever.
+ lib.optionalString (!hasFeature "python-support" features) ''
sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
''
; ;
patches = [ patches = [
# Don't install python referencing files if python support is disabled. # Don't install python referencing files if python support is disabled.
@ -272,24 +281,4 @@ let
sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8="; sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8=";
}) })
]; ];
in
stdenv.mkDerivation rec {
inherit
pname
version
src
nativeBuildInputs
buildInputs
cmakeFlags
preConfigure
# disallowedReferences
stripDebugList
patches
postInstall
passthru
doCheck
dontWrapPythonPrograms
meta
;
} }

View file

@ -0,0 +1,284 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
# Remove gcc and python references
, removeReferencesTo
, pkg-config
, volk
, cppunit
, swig
, orc
, boost
, log4cpp
, mpir
, doxygen
, python
, codec2
, gsm
, fftwFloat
, alsaLib
, libjack2
, CoreAudio
, uhd
, SDL
, gsl
, cppzmq
, zeromq
# Needed only if qt-gui is disabled, from some reason
, icu
# GUI related
, gtk3
, pango
, gobject-introspection
, cairo
, qt5
, libsForQt5
# Features available to override, the list of them is in featuresInfo. They
# are all turned on by default.
, features ? {}
# If one wishes to use a different src or name for a very custom build
, overrideSrc ? {}
, pname ? "gnuradio"
, versionAttr ? {
major = "3.8";
minor = "2";
patch = "0";
}
# We use our build of volk and not the one bundled with the release
, fetchSubmodules ? false
}:
let
sourceSha256 = "SFDjtyQRp0fXijZukpLYtISpx8imxedlYN9mRibv1eA=";
featuresInfo = {
# Needed always
basic = {
native = [
cmake
pkg-config
orc
];
runtime = [
boost
log4cpp
mpir
]
# when gr-qtgui is disabled, icu needs to be included, otherwise
# building with boost 1.7x fails
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
pythonNative = with python.pkgs; [
Mako
six
];
};
volk = {
cmakeEnableFlag = "VOLK";
runtime = [
volk
];
};
doxygen = {
native = [ doxygen ];
cmakeEnableFlag = "DOXYGEN";
};
sphinx = {
pythonNative = with python.pkgs; [ sphinx ];
cmakeEnableFlag = "SPHINX";
};
python-support = {
pythonRuntime = [ python.pkgs.six ];
native = [
swig
python
];
cmakeEnableFlag = "PYTHON";
};
testing-support = {
native = [ cppunit ];
cmakeEnableFlag = "TESTING";
};
gnuradio-runtime = {
cmakeEnableFlag = "GNURADIO_RUNTIME";
};
gr-ctrlport = {
# Thrift support is not really working well, and even the patch they
# recommend applying on 0.9.2 won't apply. See:
# https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README
cmakeEnableFlag = "GR_CTRLPORT";
native = [
swig
];
};
gnuradio-companion = {
pythonRuntime = with python.pkgs; [
pyyaml
Mako
numpy
pygobject3
];
runtime = [
gtk3
pango
gobject-introspection
cairo
];
cmakeEnableFlag = "GRC";
};
gr-blocks = {
cmakeEnableFlag = "GR_BLOCKS";
};
gr-fec = {
cmakeEnableFlag = "GR_FEC";
};
gr-fft = {
runtime = [ fftwFloat ];
cmakeEnableFlag = "GR_FFT";
};
gr-filter = {
runtime = [ fftwFloat ];
cmakeEnableFlag = "GR_FILTER";
};
gr-analog = {
cmakeEnableFlag = "GR_ANALOG";
};
gr-digital = {
cmakeEnableFlag = "GR_DIGITAL";
};
gr-dtv = {
cmakeEnableFlag = "GR_DTV";
};
gr-audio = {
runtime = []
++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
++ lib.optionals stdenv.isDarwin [ CoreAudio ]
;
cmakeEnableFlag = "GR_AUDIO";
};
gr-channels = {
cmakeEnableFlag = "GR_CHANNELS";
};
gr-qtgui = {
runtime = [ qt5.qtbase libsForQt5.qwt ];
pythonRuntime = [ python.pkgs.pyqt5 ];
cmakeEnableFlag = "GR_QTGUI";
};
gr-trellis = {
cmakeEnableFlag = "GR_TRELLIS";
};
gr-uhd = {
runtime = [ uhd ];
cmakeEnableFlag = "GR_UHD";
};
gr-utils = {
cmakeEnableFlag = "GR_UTILS";
};
gr-modtool = {
pythonRuntime = with python.pkgs; [
click
click-plugins
];
cmakeEnableFlag = "GR_MODTOOL";
};
gr-video-sdl = {
runtime = [ SDL ];
cmakeEnableFlag = "GR_VIDEO_SDL";
};
gr-vocoder = {
runtime = [ codec2 gsm ];
cmakeEnableFlag = "GR_VOCODER";
};
gr-wavelet = {
cmakeEnableFlag = "GR_WAVELET";
runtime = [ gsl ];
};
gr-zeromq = {
runtime = [ cppzmq zeromq ];
cmakeEnableFlag = "GR_ZEROMQ";
};
};
shared = (import ./shared.nix {
inherit
stdenv
lib
python
removeReferencesTo
featuresInfo
features
versionAttr
sourceSha256
overrideSrc
fetchFromGitHub
fetchSubmodules
;
qt = qt5;
gtk = gtk3;
});
inherit (shared) hasFeature; # function
in
stdenv.mkDerivation rec {
inherit pname;
inherit (shared)
version
src
nativeBuildInputs
buildInputs
disallowedReferences
stripDebugList
doCheck
dontWrapPythonPrograms
dontWrapQtApps
meta
;
passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk;
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
inherit (libsForQt5) qwt;
};
cmakeFlags = shared.cmakeFlags
# From some reason, if these are not set, libcodec2 and gsm are not
# detected properly. NOTE: qradiolink needs libcodec2 to be detected in
# order to build, see https://github.com/qradiolink/qradiolink/issues/67
++ lib.optionals (hasFeature "gr-vocoder" features) [
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
"-DLIBCODEC2_HAS_FREEDV_API=ON"
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
]
++ lib.optionals (hasFeature "volk" features && volk != null) [
"-DENABLE_INTERNAL_VOLK=OFF"
]
;
postInstall = shared.postInstall
# This is the only python reference worth removing, if needed (3.7 doesn't
# set that reference).
+ lib.optionalString (!hasFeature "python-support" features) ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
''
;
patches = [
# Don't install python referencing files if python support is disabled.
# See: https://github.com/gnuradio/gnuradio/pull/3839
(fetchpatch {
url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff";
sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q=";
})
(fetchpatch {
url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff";
sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4=";
})
# Needed to use boost 1.7x, see:
# https://github.com/gnuradio/gnuradio/issues/3720
# https://github.com/gnuradio/gnuradio/pull/3967
(fetchpatch {
url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff";
sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v";
})
];
}

View file

@ -1,53 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, boost
, gnuradio
, makeWrapper
, cppunit
, gr-osmosdr
, log4cpp
, pythonSupport ? true
, python
, swig
, fetchpatch
}:
stdenv.mkDerivation {
pname = "gr-ais";
version = "2015-12-20";
src = fetchFromGitHub {
owner = "bistromath";
repo = "gr-ais";
rev = "cdc1f52745853f9c739c718251830eb69704b26e";
sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6";
};
patches = [
(fetchpatch {
url = "https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054.patch";
sha256 = "1cwalphldvf6dbhzwz1gi53z0cb4921qsvlz4138q7m6dxccvssg";
})
];
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ]
++ lib.optionals pythonSupport [ python swig ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
meta = with lib; {
description = "Gnuradio block for ais";
homepage = "https://github.com/bistromath/gr-ais";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -5,8 +5,8 @@
# Remove gcc and python references # Remove gcc and python references
, removeReferencesTo , removeReferencesTo
, pkg-config , pkg-config
, volk
, cppunit , cppunit
, swig
, orc , orc
, boost , boost
, log4cpp , log4cpp
@ -22,8 +22,13 @@
, uhd , uhd
, SDL , SDL
, gsl , gsl
, libsodium
, libsndfile
, libunwind
, cppzmq , cppzmq
, zeromq , zeromq
# Needed only if qt-gui is disabled, from some reason
, icu
# GUI related # GUI related
, gtk3 , gtk3
, pango , pango
@ -38,16 +43,15 @@
, overrideSrc ? {} , overrideSrc ? {}
, pname ? "gnuradio" , pname ? "gnuradio"
, versionAttr ? { , versionAttr ? {
major = "3.8"; major = "3.9";
minor = "2"; minor = "0";
patch = "0"; patch = "0";
} }
# Should be false on the release after 3.8.2.0 , fetchSubmodules ? false
, fetchSubmodules ? true
}: }:
let let
sourceSha256 = "1mnfwdy7w3160vi6110x2qkyq8l78qi8771zwak9n72bl7lhhpnf"; sourceSha256 = "ZjQzioAuWrd8jsYOnLNH1mK4n9EbrjgvPX3mTzVFdLk=";
featuresInfo = { featuresInfo = {
# Needed always # Needed always
basic = { basic = {
@ -57,32 +61,26 @@ let
orc orc
]; ];
runtime = [ runtime = [
volk
boost boost
log4cpp log4cpp
mpir mpir
]; ]
# when gr-qtgui is disabled, icu needs to be included, otherwise
# building with boost 1.7x fails
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
pythonNative = with python.pkgs; [ pythonNative = with python.pkgs; [
Mako Mako
six six
]; ];
}; };
# NOTE: Should be removed on the release after 3.8.2.0, see:
# https://github.com/gnuradio/gnuradio/commit/80c04479d
volk = {
cmakeEnableFlag = "VOLK";
};
doxygen = { doxygen = {
native = [ doxygen ]; native = [ doxygen ];
cmakeEnableFlag = "DOXYGEN"; cmakeEnableFlag = "DOXYGEN";
}; };
sphinx = {
pythonNative = with python.pkgs; [ sphinx ];
cmakeEnableFlag = "SPHINX";
};
python-support = { python-support = {
pythonRuntime = [ python.pkgs.six ]; pythonRuntime = [ python.pkgs.six ];
native = [ native = [
swig
python python
]; ];
cmakeEnableFlag = "PYTHON"; cmakeEnableFlag = "PYTHON";
@ -91,17 +89,23 @@ let
native = [ cppunit ]; native = [ cppunit ];
cmakeEnableFlag = "TESTING"; cmakeEnableFlag = "TESTING";
}; };
post-install = {
cmakeEnableFlag = "POSTINSTALL";
};
gnuradio-runtime = { gnuradio-runtime = {
cmakeEnableFlag = "GNURADIO_RUNTIME"; cmakeEnableFlag = "GNURADIO_RUNTIME";
pythonRuntime = [
python.pkgs.pybind11
];
}; };
gr-ctrlport = { gr-ctrlport = {
# Thrift support is not really working well, and even the patch they # Thrift support is not really working well, and even the patch they
# recommend applying on 0.9.2 won't apply. See: # recommend applying on 0.9.2 won't apply. See:
# https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README # https://github.com/gnuradio/gnuradio/blob/v3.9.0.0/gnuradio-runtime/lib/controlport/thrift/README
cmakeEnableFlag = "GR_CTRLPORT"; runtime = [
native = [ libunwind
swig
]; ];
cmakeEnableFlag = "GR_CTRLPORT";
}; };
gnuradio-companion = { gnuradio-companion = {
pythonRuntime = with python.pkgs; [ pythonRuntime = with python.pkgs; [
@ -110,11 +114,15 @@ let
numpy numpy
pygobject3 pygobject3
]; ];
native = [
python.pkgs.pytest
];
runtime = [ runtime = [
gtk3 gtk3
pango pango
gobject-introspection gobject-introspection
cairo cairo
libsndfile
]; ];
cmakeEnableFlag = "GRC"; cmakeEnableFlag = "GRC";
}; };
@ -160,7 +168,9 @@ let
cmakeEnableFlag = "GR_TRELLIS"; cmakeEnableFlag = "GR_TRELLIS";
}; };
gr-uhd = { gr-uhd = {
runtime = [ uhd ]; runtime = [
uhd
];
cmakeEnableFlag = "GR_UHD"; cmakeEnableFlag = "GR_UHD";
}; };
gr-utils = { gr-utils = {
@ -173,22 +183,29 @@ let
]; ];
cmakeEnableFlag = "GR_MODTOOL"; cmakeEnableFlag = "GR_MODTOOL";
}; };
gr-blocktool = {
cmakeEnableFlag = "GR_BLOCKTOOL";
};
gr-video-sdl = { gr-video-sdl = {
runtime = [ SDL ]; runtime = [ SDL ];
cmakeEnableFlag = "GR_VIDEO_SDL"; cmakeEnableFlag = "GR_VIDEO_SDL";
}; };
gr-vocoder = { # codec2 and gsm support is broken with gr3.9: https://github.com/gnuradio/gnuradio/issues/4278
runtime = [ codec2 gsm ]; # gr-vocoder = {
cmakeEnableFlag = "GR_VOCODER"; # runtime = [ codec2 gsm ];
}; # cmakeEnableFlag = "GR_VOCODER";
# };
gr-wavelet = { gr-wavelet = {
cmakeEnableFlag = "GR_WAVELET"; cmakeEnableFlag = "GR_WAVELET";
runtime = [ gsl ]; runtime = [ gsl libsodium ];
}; };
gr-zeromq = { gr-zeromq = {
runtime = [ cppzmq zeromq ]; runtime = [ cppzmq zeromq ];
cmakeEnableFlag = "GR_ZEROMQ"; cmakeEnableFlag = "GR_ZEROMQ";
}; };
gr-network = {
cmakeEnableFlag = "GR_NETWORK";
};
}; };
shared = (import ./shared.nix { shared = (import ./shared.nix {
inherit inherit
@ -207,84 +224,42 @@ let
qt = qt5; qt = qt5;
gtk = gtk3; gtk = gtk3;
}); });
inherit (shared) inherit (shared) hasFeature; # function
version
src
hasFeature # function
nativeBuildInputs
buildInputs
disallowedReferences
stripDebugList
passthru
doCheck
dontWrapPythonPrograms
dontWrapQtApps
meta
;
cmakeFlags = shared.cmakeFlags
# From some reason, if these are not set, libcodec2 and gsm are not
# detected properly. NOTE: qradiolink needs libcodec2 to be detected in
# order to build, see https://github.com/qradiolink/qradiolink/issues/67
++ lib.optionals (hasFeature "gr-vocoder" features) [
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
"-DLIBCODEC2_HAS_FREEDV_API=ON"
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
]
;
postInstall = shared.postInstall
# This is the only python reference worth removing, if needed (3.7 doesn't
# set that reference).
+ lib.optionalString (!hasFeature "python-support" features) ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
''
;
preConfigure = ""
# If python-support is disabled, don't install volk's (git submodule)
# volk_modtool - it references python.
#
# NOTE: on the next release, volk will always be required to be installed
# externally (submodule removed upstream). Hence this hook will fail and
# we'll need to package volk while able to tell it to install or not
# install python referencing files. When we'll be there, this will help:
# https://github.com/gnuradio/volk/pull/404
+ lib.optionalString (!hasFeature "python-support" features) ''
sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
''
;
patches = [
# Don't install python referencing files if python support is disabled.
# See: https://github.com/gnuradio/gnuradio/pull/3839
(fetchpatch {
url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff";
sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q=";
})
(fetchpatch {
url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff";
sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4=";
})
];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
inherit inherit pname;
pname inherit (shared)
version version
src src
nativeBuildInputs nativeBuildInputs
buildInputs buildInputs
cmakeFlags cmakeFlags
preConfigure disallowedReferences
# disallowedReferences
stripDebugList stripDebugList
patches
postInstall
passthru
doCheck doCheck
dontWrapPythonPrograms dontWrapPythonPrograms
dontWrapQtApps dontWrapQtApps
meta meta
; ;
passthru = shared.passthru // {
# Deps that are potentially overriden and are used inside GR plugins - the same version must
inherit boost volk;
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
inherit (libsForQt5) qwt;
};
postInstall = shared.postInstall
# This is the only python reference worth removing, if needed.
# Even if python support is enabled, and we don't care about this
# reference, pybind's path is not properly set. See:
# https://github.com/gnuradio/gnuradio/issues/4380
+ lib.optionalString (!hasFeature "python-support" features) ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so)
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
''
;
} }

View file

@ -1,37 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
, makeWrapper, cppunit, libosmocore, gr-osmosdr
, pythonSupport ? true, python, swig
}:
assert pythonSupport -> python != null && swig != null;
stdenv.mkDerivation {
pname = "gr-gsm";
version = "2016-08-25";
src = fetchFromGitHub {
owner = "ptrkrysik";
repo = "gr-gsm";
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp
] ++ lib.optionals pythonSupport [ python swig ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out")
done
'';
meta = with lib; {
description = "Gnuradio block for gsm";
homepage = "https://github.com/ptrkrysik/gr-gsm";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -1,38 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio
, pythonSupport ? true, python, swig, limesuite, log4cpp
} :
assert pythonSupport -> python != null && swig != null;
let
version = "2.0.0";
in stdenv.mkDerivation {
pname = "gr-limesdr";
inherit version;
src = fetchFromGitHub {
owner = "myriadrf";
repo = "gr-limesdr";
rev = "v${version}";
sha256 = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
};
nativeBuildInputs = [
cmake
pkg-config
] ++ lib.optionals pythonSupport [ swig ];
buildInputs = [
boost gnuradio limesuite log4cpp
] ++ lib.optionals pythonSupport [ python ];
meta = with lib; {
description = "Gnuradio source and sink blocks for LimeSDR";
homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -1,45 +0,0 @@
{ lib, stdenv, fetchgit, cmake, pkg-config, makeWrapper
, boost
, pythonSupport ? true, python, swig
, airspy
, gnuradio
, hackrf
, libbladeRF
, rtl-sdr
, soapysdr-with-plugins
, uhd
, log4cpp
}:
assert pythonSupport -> python != null && swig != null;
stdenv.mkDerivation rec {
pname = "gr-osmosdr";
version = "0.1.5";
src = fetchgit {
url = "git://git.osmocom.org/gr-osmosdr";
rev = "v${version}";
sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
};
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
buildInputs = [
boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd
] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
meta = with lib; {
description = "Gnuradio block for OsmoSDR and rtl-sdr";
homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor ];
};
}

View file

@ -1,36 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
, makeWrapper, pythonSupport ? true, python, swig
}:
assert pythonSupport -> python != null && swig != null;
stdenv.mkDerivation rec {
pname = "gr-rds";
version = "1.1.0";
src = fetchFromGitHub {
owner = "bastibl";
repo = "gr-rds";
rev = "v${version}";
sha256 = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
boost gnuradio makeWrapper log4cpp
] ++ lib.optionals pythonSupport [ python swig ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
meta = with lib; {
description = "Gnuradio block for radio data system";
homepage = "https://github.com/bastibl/gr-rds";
license = licenses.gpl2Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -85,9 +85,6 @@ rec {
; ;
postInstall = "" postInstall = ""
# Gcc references # Gcc references
+ lib.optionalString (hasFeature "volk" features) ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
''
+ lib.optionalString (hasFeature "gnuradio-runtime" features) '' + lib.optionalString (hasFeature "gnuradio-runtime" features) ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so) ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so)
'' ''
@ -103,9 +100,11 @@ rec {
features features
featuresInfo featuresInfo
python python
qt
gtk
; ;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
inherit qt;
} // lib.optionalAttrs (hasFeature "gnuradio-companion" features) {
inherit gtk;
}; };
# Wrapping is done with an external wrapper # Wrapping is done with an external wrapper
dontWrapPythonPrograms = true; dontWrapPythonPrograms = true;

View file

@ -1,9 +1,16 @@
{ lib { lib
, stdenv , stdenv
# The unwrapped gnuradio derivation
, unwrapped , unwrapped
# If it's a minimal build, we don't want to wrap it with lndir and
# wrapProgram..
, wrap ? true
# For the wrapper
, makeWrapper , makeWrapper
# For lndir # For lndir
, xorg , xorg
# To define a the gnuradio.pkgs scope
, newScope
# For Emulating wrapGAppsHook # For Emulating wrapGAppsHook
, gsettings-desktop-schemas , gsettings-desktop-schemas
, glib , glib
@ -37,12 +44,16 @@ let
[] []
) )
) unwrapped.featuresInfo) ) unwrapped.featuresInfo)
++ lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [ ++ lib.optionals
# Add unwrapped itself as a python module (unwrapped.hasFeature "python-support" unwrapped.features)
(unwrapped.python.pkgs.toPythonModule unwrapped) (
] # Add unwrapped itself as a python module
[ (unwrapped.python.pkgs.toPythonModule unwrapped) ]
# Add all extraPackages as python modules
++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
)
; ;
python3Env = unwrapped.python.withPackages(ps: pythonPkgs); pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs);
name = (lib.appendToName "wrapped" unwrapped).name; name = (lib.appendToName "wrapped" unwrapped).name;
makeWrapperArgs = builtins.concatStringsSep " " ([ makeWrapperArgs = builtins.concatStringsSep " " ([
@ -88,48 +99,84 @@ let
(if unwrapped.versionAttr.major == "3.8" then (if unwrapped.versionAttr.major == "3.8" then
[ [
"--prefix" "QT_PLUGIN_PATH" ":" "--prefix" "QT_PLUGIN_PATH" ":"
"${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}" "${
lib.makeSearchPath
unwrapped.qt.qtbase.qtPluginPrefix
(builtins.map lib.getBin [
unwrapped.qt.qtbase
unwrapped.qt.qtwayland
])
}"
"--prefix" "QML2_IMPORT_PATH" ":" "--prefix" "QML2_IMPORT_PATH" ":"
"${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}" "${
lib.makeSearchPath
unwrapped.qt.qtbase.qtQmlPrefix
(builtins.map lib.getBin [
unwrapped.qt.qtbase
unwrapped.qt.qtwayland
])
}"
] ]
else else
# TODO: Add here qt4 related environment for 3.7? # Add here qt4 related environment for 3.7?
[ [
] ]
) )
++ extraMakeWrapperArgs ++ extraMakeWrapperArgs
); );
in
stdenv.mkDerivation {
inherit name;
buildInputs = [ packages = import ../../../top-level/gnuradio-packages.nix {
makeWrapper inherit lib stdenv newScope;
xorg.lndir gnuradio = unwrapped;
];
passthru = {
inherit python3Env pythonPkgs unwrapped;
}; };
passthru = unwrapped.passthru // {
buildCommand = '' inherit
mkdir $out pythonEnv
cd $out pythonPkgs
lndir -silent ${unwrapped} unwrapped
for i in $out/bin/*; do ;
if [[ ! -x "$i" ]]; then pkgs = packages;
continue };
fi self = if wrap then
cp -L "$i" "$i".tmp stdenv.mkDerivation {
mv -f "$i".tmp "$i" inherit name passthru;
if head -1 "$i" | grep -q ${unwrapped.python}; then buildInputs = [
substituteInPlace "$i" \ makeWrapper
--replace ${unwrapped.python} ${python3Env} xorg.lndir
fi ];
wrapProgram "$i" ${makeWrapperArgs} buildCommand = ''
done mkdir $out
''; cd $out
lndir -silent ${unwrapped}
inherit (unwrapped) meta; ${lib.optionalString
} (extraPackages != [])
(builtins.concatStringsSep "\n"
(builtins.map (pkg: ''
if [[ -d ${lib.getBin pkg}/bin/ ]]; then
lndir -silent ${pkg}/bin ./bin
fi
'') extraPackages)
)
}
for i in $out/bin/*; do
if [[ ! -x "$i" ]]; then
continue
fi
cp -L "$i" "$i".tmp
mv -f "$i".tmp "$i"
if head -1 "$i" | grep -q ${unwrapped.python}; then
substituteInPlace "$i" \
--replace ${unwrapped.python} ${pythonEnv}
fi
wrapProgram "$i" ${makeWrapperArgs}
done
'';
inherit (unwrapped) meta;
}
else
unwrapped.overrideAttrs(_: {
inherit passthru;
})
;
in self

View file

@ -1,13 +1,23 @@
{ lib, fetchFromGitHub, cmake, qtbase, qtsvg, gnuradio, boost, gr-osmosdr { lib
, mkDerivation , fetchFromGitHub
, cmake
, pkg-config
, qt5
, gnuradio3_8Minimal
, log4cpp
, mpir
, fftwFloat
, alsaLib
, libjack2
# drivers (optional): # drivers (optional):
, rtl-sdr, hackrf , rtl-sdr
, hackrf
, pulseaudioSupport ? true, libpulseaudio , pulseaudioSupport ? true, libpulseaudio
}: }:
assert pulseaudioSupport -> libpulseaudio != null; assert pulseaudioSupport -> libpulseaudio != null;
mkDerivation rec { gnuradio3_8Minimal.pkgs.mkDerivation rec {
pname = "gqrx"; pname = "gqrx";
version = "2.14.4"; version = "2.14.4";
@ -18,9 +28,23 @@ mkDerivation rec {
sha256 = "sha256-mMaxu0jq2GaNLWjLsJQXx+zCxtyiCAZQJJZ8GJtnllQ="; sha256 = "sha256-mMaxu0jq2GaNLWjLsJQXx+zCxtyiCAZQJJZ8GJtnllQ=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [
cmake
pkg-config
qt5.wrapQtAppsHook
];
buildInputs = [ buildInputs = [
qtbase qtsvg gnuradio boost gr-osmosdr rtl-sdr hackrf log4cpp
mpir
fftwFloat
alsaLib
libjack2
gnuradio3_8Minimal.unwrapped.boost
qt5.qtbase
qt5.qtsvg
gnuradio3_8Minimal.pkgs.osmosdr
rtl-sdr
hackrf
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ]; ] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
postInstall = '' postInstall = ''

View file

@ -1,17 +1,14 @@
{ lib { lib
, mkDerivation , gnuradio3_8Minimal
, fetchFromGitHub , fetchFromGitHub
, pkg-config , pkg-config
, cmake , cmake
, boost
, fftwFloat , fftwFloat
, gnuradio , qt5
, liquid-dsp , liquid-dsp
, qtbase
, wrapQtAppsHook
}: }:
mkDerivation rec { gnuradio3_8Minimal.pkgs.mkDerivation rec {
pname = "inspectrum"; pname = "inspectrum";
version = "0.2.3"; version = "0.2.3";
@ -22,13 +19,15 @@ mkDerivation rec {
sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355"; sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355";
}; };
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; nativeBuildInputs = [
cmake
qt5.wrapQtAppsHook
pkg-config
];
buildInputs = [ buildInputs = [
fftwFloat fftwFloat
boost
gnuradio
liquid-dsp liquid-dsp
qtbase qt5.qtbase
]; ];
meta = with lib; { meta = with lib; {

View file

@ -1,51 +1,71 @@
{ lib, stdenv, fetchFromGitHub, alsaLib, boost { lib
, qt4, libpulseaudio, codec2, libconfig , fetchFromGitHub
, gnuradio, gr-osmosdr, gsm , libpulseaudio
, libopus, libjpeg, protobuf, qwt, speex , libconfig
} : # Needs a gnuradio built with qt gui support
, gnuradio3_8
# Not gnuradioPackages'
, codec2
, log4cpp
, gmp
, gsm
, libopus
, libjpeg
, libsndfile
, libftdi
, protobuf
, speex
, speexdsp
}:
let gnuradio3_8.pkgs.mkDerivation rec {
version = "0.5.0";
in stdenv.mkDerivation {
pname = "qradiolink"; pname = "qradiolink";
inherit version; version = "0.8.5-2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kantooon"; owner = "qradiolink";
repo = "qradiolink"; repo = "qradiolink";
rev = version; rev = version;
sha256 = "0xhg5zhjznmls5m3rhpk1qx0dipxmca12s85w15d0i7qwva2f1gi"; sha256 = "MgHfKR3AJW3pIN9oCBr4BWxk1fGSCpLmMzjxvuTmuFA=";
}; };
preBuild = '' preBuild = ''
cd ext cd src/ext
protoc --cpp_out=. Mumble.proto protoc --cpp_out=. Mumble.proto
protoc --cpp_out=. QRadioLink.proto protoc --cpp_out=. QRadioLink.proto
cd .. cd ../..
qmake qmake
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin install -D qradiolink $out/bin/qradiolink
cp qradiolink $out/bin install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png
install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop
''; '';
buildInputs = [ buildInputs = [
qt4 gnuradio3_8.unwrapped.boost
alsaLib
boost
libpulseaudio
codec2 codec2
log4cpp
gmp
libpulseaudio
libconfig libconfig
gsm gsm
gnuradio gnuradio3_8.pkgs.osmosdr
gr-osmosdr
libopus libopus
libjpeg libjpeg
protobuf
speex speex
qwt speexdsp
gnuradio3_8.qt.qtbase
gnuradio3_8.qt.qtmultimedia
libftdi
libsndfile
gnuradio3_8.qwt
];
nativeBuildInputs = [
protobuf
gnuradio3_8.qt.qmake
gnuradio3_8.qt.wrapQtAppsHook
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -0,0 +1,159 @@
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, cmake
, pkg-config
# See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations
, boost
, enableLibuhd_C_api ? true
# requires numpy
, enableLibuhd_Python_api ? false
, python3
, enableExamples ? false
, enableUtils ? false
, enableLiberio ? false
, liberio
, libusb1
, enableDpdk ? false
, dpdk
# Devices
, enableOctoClock ? true
, enableMpmd ? true
, enableB100 ? true
, enableB200 ? true
, enableUsrp1 ? true
, enableUsrp2 ? true
, enableX300 ? true
, enableN230 ? true
, enableN300 ? true
, enableN320 ? true
, enableE300 ? true
, enableE320 ? true
}:
let
onOffBool = b: if b then "ON" else "OFF";
inherit (lib) optionals;
in
stdenv.mkDerivation rec {
pname = "uhd";
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
# and xxx.yyy.zzz. Hrmpf... style keeps changing
version = "3.15.0.0";
src = fetchFromGitHub {
owner = "EttusResearch";
repo = "uhd";
rev = "v${version}";
sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf";
};
# Firmware images are downloaded (pre-built) from the respective release on Github
uhdImagesSrc = fetchurl {
url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp";
};
cmakeFlags = [
"-DENABLE_LIBUHD=ON"
"-DENABLE_USB=ON"
"-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases
"-DENABLE_EXAMPLES=${onOffBool enableExamples}"
"-DENABLE_UTILS=${onOffBool enableUtils}"
"-DENABLE_LIBUHD_C_API=${onOffBool enableLibuhd_C_api}"
"-DENABLE_LIBUHD_PYTHON_API=${onOffBool enableLibuhd_Python_api}"
"-DENABLE_LIBERIO=${onOffBool enableLiberio}"
"-DENABLE_DPDK=${onOffBool enableDpdk}"
# Devices
"-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}"
"-DENABLE_MPMD=${onOffBool enableMpmd}"
"-DENABLE_B100=${onOffBool enableB100}"
"-DENABLE_B200=${onOffBool enableB200}"
"-DENABLE_USRP1=${onOffBool enableUsrp1}"
"-DENABLE_USRP2=${onOffBool enableUsrp2}"
"-DENABLE_X300=${onOffBool enableX300}"
"-DENABLE_N230=${onOffBool enableN230}"
"-DENABLE_N300=${onOffBool enableN300}"
"-DENABLE_N320=${onOffBool enableN320}"
"-DENABLE_E300=${onOffBool enableE300}"
"-DENABLE_E320=${onOffBool enableE320}"
]
# TODO: Check if this still needed
# ABI differences GCC 7.1
# /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1
++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
;
# Python + Mako are always required for the build itself but not necessary for runtime.
pythonEnv = python3.withPackages (ps: with ps; [ Mako ]
++ optionals (enableLibuhd_Python_api) [ numpy setuptools ]
++ optionals (enableUtils) [ requests six ]
);
nativeBuildInputs = [
cmake
pkg-config
]
# If both enableLibuhd_Python_api and enableUtils are off, we don't need
# pythonEnv in buildInputs as it's a 'build' dependency and not a runtime
# dependency
++ optionals (!enableLibuhd_Python_api && !enableUtils) [ pythonEnv ]
;
buildInputs = [
boost
libusb1
]
# However, if enableLibuhd_Python_api *or* enableUtils is on, we need
# pythonEnv for runtime as well. The utilities' runtime dependencies are
# handled at the environment
++ optionals (enableLibuhd_Python_api || enableUtils) [ pythonEnv ]
++ optionals (enableLiberio) [ liberio ]
++ optionals (enableDpdk) [ dpdk ]
;
doCheck = true;
# Build only the host software
preConfigure = "cd host";
# TODO: Check if this still needed, perhaps relevant:
# https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm
patches = if stdenv.isAarch32 then ./neon.patch else null;
postPhases = [ "installFirmware" "removeInstalledTests" ]
++ optionals (enableUtils) [ "moveUdevRules" ]
;
# UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
installFirmware = ''
mkdir -p "$out/share/uhd/images"
tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images"
'';
# -DENABLE_TESTS=ON installs the tests, we don't need them in the output
removeInstalledTests = ''
rm -r $out/lib/uhd/tests
'';
# Moves the udev rules to the standard location, needed only if utils are
# enabled
moveUdevRules = ''
mkdir -p $out/lib/udev/rules.d
mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/
'';
meta = with lib; {
description = "USRP Hardware Driver (for Software Defined Radio)";
longDescription = ''
The USRP Hardware Driver (UHD) software is the hardware driver for all
USRP (Universal Software Radio Peripheral) devices.
USRP devices are designed and sold by Ettus Research, LLC and its parent
company, National Instruments.
'';
homepage = "https://uhd.ettus.com/";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor fpletz tomberek ];
};
}

View file

@ -1,4 +1,5 @@
{ lib, stdenv { lib
, stdenv
, fetchurl , fetchurl
, fetchFromGitHub , fetchFromGitHub
, cmake , cmake
@ -8,14 +9,14 @@
, enableLibuhd_C_api ? true , enableLibuhd_C_api ? true
# requires numpy # requires numpy
, enableLibuhd_Python_api ? false , enableLibuhd_Python_api ? false
, python3 ? null , python3
, enableExamples ? false , enableExamples ? false
, enableUtils ? false , enableUtils ? false
, enableLiberio ? false , enableLiberio ? false
, liberio ? null , liberio
, libusb1 ? null , libusb1
, enableDpdk ? false , enableDpdk ? false
, dpdk ? null , dpdk
# Devices # Devices
, enableOctoClock ? true , enableOctoClock ? true
, enableMpmd ? true , enableMpmd ? true
@ -40,18 +41,18 @@ stdenv.mkDerivation rec {
pname = "uhd"; pname = "uhd";
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
# and xxx.yyy.zzz. Hrmpf... style keeps changing # and xxx.yyy.zzz. Hrmpf... style keeps changing
version = "3.15.0.0"; version = "4.0.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "EttusResearch"; owner = "EttusResearch";
repo = "uhd"; repo = "uhd";
rev = "v${version}"; rev = "v${version}";
sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf"; sha256 = "NCyiI4pIPw0nBRFdUGpgZ/x2mWz+Qm78ZGACUnSbGSs=";
}; };
# Firmware images are downloaded (pre-built) from the respective release on Github # Firmware images are downloaded (pre-built) from the respective release on Github
uhdImagesSrc = fetchurl { uhdImagesSrc = fetchurl {
url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz"; url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp"; sha256 = "Xfx0bsHUQ5+Dp+xk0sVWWP83oyXQcUH5AX4PNEE7fY4=";
}; };
cmakeFlags = [ cmakeFlags = [

View file

@ -0,0 +1,45 @@
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, cmake
, pkg-config
, python
, boost
, cppunit
, log4cpp
, osmosdr
}:
mkDerivation rec {
pname = "gr-ais";
version = "2015-12-20";
src = fetchFromGitHub {
owner = "bistromath";
repo = "gr-ais";
rev = "cdc1f52745853f9c739c718251830eb69704b26e";
sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6";
};
disabledForGRafter = "3.8";
nativeBuildInputs = [
cmake
pkg-config
python
];
buildInputs = [
cppunit
osmosdr
boost
log4cpp
];
meta = with lib; {
description = "Gnuradio block for ais";
homepage = "https://github.com/bistromath/gr-ais";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -0,0 +1,48 @@
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, pkg-config
, cppunit
, swig
, boost
, log4cpp
, python
, libosmocore
, osmosdr
}:
mkDerivation {
pname = "gr-gsm";
version = "2016-08-25";
src = fetchFromGitHub {
owner = "ptrkrysik";
repo = "gr-gsm";
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
};
disabledForGRafter = "3.8";
nativeBuildInputs = [
cmake
pkg-config
swig
python
];
buildInputs = [
cppunit
log4cpp
boost
libosmocore
osmosdr
];
meta = with lib; {
description = "Gnuradio block for gsm";
homepage = "https://github.com/ptrkrysik/gr-gsm";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -0,0 +1,61 @@
{ lib
, mkDerivation
, fetchFromGitHub
, gnuradio
, cmake
, pkg-config
, doxygen
, swig
, python
, log4cpp
, mpir
, boost
, gmp
, icu
, limesuite
}:
let
version = {
"3.7" = "2.0.0";
"3.8" = "3.0.1";
"3.9" = null;
}.${gnuradio.versionAttr.major};
src = fetchFromGitHub {
owner = "myriadrf";
repo = "gr-limesdr";
rev = "v${version}";
sha256 = {
"3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
"3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
"3.9" = null;
}.${gnuradio.versionAttr.major};
};
in mkDerivation {
pname = "gr-limesdr";
inherit version src;
disabledForGRafter = "3.9";
nativeBuildInputs = [
cmake
pkg-config
swig
python
];
buildInputs = [
log4cpp
mpir
boost
gmp
icu
limesuite
];
meta = with lib; {
description = "Gnuradio source and sink blocks for LimeSDR";
homepage = "https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.markuskowa ];
};
}

View file

@ -0,0 +1,25 @@
{ lib
, unwrapped
}:
mkDerivation:
args:
# Check if it's supposed to not get built for the current gnuradio version
if (builtins.hasAttr "disabledForGRafter" args) &&
(lib.versionAtLeast unwrapped.versionAttr.major args.disabledForGRafter) then
let name = args.name or "${args.pname}"; in
throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}"
else
let
args_ = {
enableParallelBuilding = args.enableParallelBuilding or true;
nativeBuildInputs = (args.nativeBuildInputs or []);
# We add gnuradio and volk itself by default - most gnuradio based packages
# will not consider it a depenency worth mentioning and it will almost
# always be needed
buildInputs = (args.buildInputs or []) ++ [ unwrapped unwrapped.volk ];
};
in mkDerivation (args // args_)

View file

@ -1,31 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, uhd { lib
, makeWrapper, libsodium, cppunit, log4cpp , mkDerivation
, pythonSupport ? true, python, swig , fetchFromGitHub
, cmake
, pkg-config
, cppunit
, swig
, boost
, log4cpp
, python
, libsodium
}: }:
assert pythonSupport -> python != null && swig != null; mkDerivation {
stdenv.mkDerivation {
pname = "gr-nacl"; pname = "gr-nacl";
version = "2017-04-10"; version = "2017-04-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "stwunsch"; owner = "stwunsch";
repo = "gr-nacl"; repo = "gr-nacl";
rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765";
sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v";
}; };
disabledForGRafter = "3.8";
nativeBuildInputs = [
cmake
pkg-config
swig
python
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ buildInputs = [
boost gnuradio uhd makeWrapper libsodium cppunit log4cpp cppunit
] ++ lib.optionals pythonSupport [ python swig ]; log4cpp
boost
postInstall = '' libsodium
for prog in "$out"/bin/*; do ];
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
meta = with lib; { meta = with lib; {
description = "Gnuradio block for encryption"; description = "Gnuradio block for encryption";

View file

@ -0,0 +1,86 @@
{ lib
, mkDerivation
, fetchgit
, gnuradio
, cmake
, pkg-config
, log4cpp
, mpir
, boost
, gmp
, fftwFloat
, python
, swig
, uhd
, icu
, airspy
, hackrf
, libbladeRF
, rtl-sdr
, soapysdr-with-plugins
}:
let
version = {
"3.7" = "0.1.5";
"3.8" = "0.2.2";
"3.9" = null;
}.${gnuradio.versionAttr.major};
src = fetchgit {
url = "git://git.osmocom.org/gr-osmosdr";
rev = "v${version}";
sha256 = {
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
"3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs=";
"3.9" = null;
}.${gnuradio.versionAttr.major};
};
in mkDerivation {
pname = "gr-osmosdr";
inherit version src;
disabledForGRafter = "3.9";
buildInputs = [
log4cpp
mpir
boost
fftwFloat
gmp
icu
airspy
hackrf
libbladeRF
rtl-sdr
soapysdr-with-plugins
] ++ lib.optional (gnuradio.hasFeature "gr-uhd" gnuradio.features) [
uhd
];
cmakeFlags = [
(if (gnuradio.hasFeature "python-support" gnuradio.features) then
"-DENABLE_PYTHON=ON"
else
"-DENABLE_PYTHON=OFF"
)
];
nativeBuildInputs = [
cmake
pkg-config
swig
] ++ lib.optionals (gnuradio.hasFeature "python-support" gnuradio.features) [
(if (gnuradio.versionAttr.major == "3.7") then
python.pkgs.cheetah
else
python.pkgs.Mako
)
python
]
;
meta = with lib; {
description = "Gnuradio block for OsmoSDR and rtl-sdr";
homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ bjornfor ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,59 @@
{ lib
, mkDerivation
, fetchFromGitHub
, gnuradio
, cmake
, pkg-config
, swig
, python
, log4cpp
, mpir
, boost
, gmp
, icu
}:
let
version = {
"3.7" = "1.1.0";
"3.8" = "3.8.0";
"3.9" = null;
}.${gnuradio.versionAttr.major};
src = fetchFromGitHub {
owner = "bastibl";
repo = "gr-rds";
rev = "v${version}";
sha256 = {
"3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
"3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
"3.9" = null;
}.${gnuradio.versionAttr.major};
};
in mkDerivation {
pname = "gr-rds";
inherit version src;
disabledForGRafter = "3.9";
buildInputs = [
log4cpp
mpir
boost
gmp
icu
];
nativeBuildInputs = [
cmake
pkg-config
swig
python
];
meta = with lib; {
description = "Gnuradio block for radio data system";
homepage = "https://github.com/bastibl/gr-rds";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ mog ];
};
}

View file

@ -0,0 +1,51 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, cppunit
, python3
, enableModTool ? true
, removeReferencesTo
}:
stdenv.mkDerivation rec {
pname = "volk";
version = "2.4.1";
src = fetchFromGitHub {
owner = "gnuradio";
repo = pname;
rev = "v${version}";
sha256 = "fuHJ+p5VN4ThdbQFbzB08VCuy/Zo7m/I1Gs5EQGPeNY=";
fetchSubmodules = true;
};
patches = [
# Fixes a failing test: https://github.com/gnuradio/volk/pull/434
(fetchpatch {
url = "https://github.com/gnuradio/volk/pull/434/commits/bce8531b6f1a3c5abe946ed6674b283d54258281.patch";
sha256 = "OLW9uF6iL47z63kjvYqwsWtkINav8Xhs+Htqg6Kr4uI=";
})
];
cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ];
postInstall = ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
'';
nativeBuildInputs = [
cmake
python3
python3.pkgs.Mako
];
doCheck = true;
meta = with lib; {
homepage = "http://libvolk.org/";
description = "The Vector Optimized Library of Kernels";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.all;
};
}

View file

@ -240,16 +240,24 @@ mapAliases ({
gnome_doc_utils = gnome-doc-utils; # added 2018-02-25 gnome_doc_utils = gnome-doc-utils; # added 2018-02-25
gnome_themes_standard = gnome-themes-standard; # added 2018-02-25 gnome_themes_standard = gnome-themes-standard; # added 2018-02-25
gnunet_git = throw "gnunet_git was removed due to gnunet becoming stable"; # added 2019-05-27 gnunet_git = throw "gnunet_git was removed due to gnunet becoming stable"; # added 2019-05-27
gnuradio-nacl = gr-nacl; # added 2019-05-27 # Added 2020-10-16
gnuradio-gsm = gr-gsm; # added 2019-05-27
gnuradio-ais = gr-ais; # added 2019-05-27
gnuradio-limesdr = gr-limesdr; # added 2019-05-27
gnuradio-rds = gr-rds; # added 2019-05-27
gnuradio-osmosdr = gr-osmosdr; # added 2019-05-27
# added 20-10-2020
gnuradio-with-packages = gnuradio3_7.override { gnuradio-with-packages = gnuradio3_7.override {
extraPackages = [ gr-nacl gr-gsm gr-ais gr-limesdr gr-rds gr-osmosdr ]; extraPackages = lib.attrVals [
"osmosdr" "ais" "gsm" "nacl" "rds" "limesdr"
] gnuradio3_7Packages;
}; };
gnuradio-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16
gnuradio-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16
gnuradio-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16
gnuradio-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16
gnuradio-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16
gnuradio-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16
gr-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16
gr-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16
gr-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16
gr-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16
gr-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16
gr-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16
gnustep-make = gnustep.make; # added 2016-7-6 gnustep-make = gnustep.make; # added 2016-7-6
gnupg20 = throw "gnupg20 has been removed from nixpkgs as upstream dropped support on 2017-12-31";# added 2020-07-12 gnupg20 = throw "gnupg20 has been removed from nixpkgs as upstream dropped support on 2017-12-31";# added 2020-07-12
gnuvd = throw "gnuvd was removed because the backend service is missing"; # added 2020-01-14 gnuvd = throw "gnuvd was removed because the backend service is missing"; # added 2020-01-14

View file

@ -3957,6 +3957,8 @@ in
volctl = callPackage ../tools/audio/volctl { }; volctl = callPackage ../tools/audio/volctl { };
volk = callPackage ../development/libraries/volk { };
vorta = libsForQt5.callPackage ../applications/backup/vorta { }; vorta = libsForQt5.callPackage ../applications/backup/vorta { };
utahfs = callPackage ../applications/networking/utahfs { }; utahfs = callPackage ../applications/networking/utahfs { };
@ -13145,7 +13147,10 @@ in
uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { }; uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { };
uhd = callPackage ../applications/radio/uhd { }; uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { };
uhd = callPackage ../applications/radio/uhd {
boost = boost17x;
};
uisp = callPackage ../development/tools/misc/uisp { }; uisp = callPackage ../development/tools/misc/uisp { };
@ -16779,13 +16784,7 @@ in
qm-dsp = callPackage ../development/libraries/audio/qm-dsp { }; qm-dsp = callPackage ../development/libraries/audio/qm-dsp { };
qradiolink = callPackage ../applications/radio/qradiolink { qradiolink = callPackage ../applications/radio/qradiolink { };
# 3.8 support is not ready yet:
# https://github.com/qradiolink/qradiolink/issues/67#issuecomment-703222573
# The non minimal build is used because the 'qtgui' component is needed.
# gr-osmosdr is using the same gnuradio as of now.
gnuradio = gnuradio3_7-unwrapped;
};
qrupdate = callPackage ../development/libraries/qrupdate { }; qrupdate = callPackage ../development/libraries/qrupdate { };
@ -22339,81 +22338,97 @@ in
gksu = callPackage ../applications/misc/gksu { }; gksu = callPackage ../applications/misc/gksu { };
gnss-sdr = callPackage ../applications/radio/gnss-sdr { gnss-sdr = callPackage ../applications/radio/gnss-sdr { };
boost = boost166;
gnuradio = gnuradio3_7-unwrapped;
};
gnuradio-unwrapped = callPackage ../applications/radio/gnuradio { gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix {
inherit (darwin.apple_sdk.frameworks) CoreAudio; unwrapped = callPackage ../applications/radio/gnuradio {
python = python3; inherit (darwin.apple_sdk.frameworks) CoreAudio;
}; python = python3;
# A build without gui components and other utilites not needed for end user boost = boost17x;
# libraries
gnuradioMinimal = gnuradio-unwrapped.override {
features = {
gnuradio-companion = false;
python-support = false;
gr-ctrlport = false;
examples = false;
gr-qtgui = false;
gr-utils = false;
gr-modtool = false;
sphinx = false;
doxygen = false;
}; };
}; };
gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix { gnuradioPackages = lib.recurseIntoAttrs gnuradio.pkgs;
unwrapped = gnuradio-unwrapped; # A build without gui components and other utilites not needed for end user
# libraries
gnuradioMinimal = gnuradio.override {
wrap = false;
unwrapped = gnuradio.unwrapped.override {
volk = volk.override {
# So it will not reference python
enableModTool = false;
};
features = {
gnuradio-companion = false;
python-support = false;
examples = false;
gr-qtgui = false;
gr-utils = false;
gr-modtool = false;
gr-blocktool = false;
sphinx = false;
doxygen = false;
};
};
}; };
gnuradio3_7-unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix { gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix {
inherit (darwin.apple_sdk.frameworks) CoreAudio; unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix {
python = python2; inherit (darwin.apple_sdk.frameworks) CoreAudio;
python = python3;
boost = boost17x;
};
}; };
gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs;
# A build without gui components and other utilites not needed if gnuradio is # A build without gui components and other utilites not needed if gnuradio is
# used as a c++ library. # used as a c++ library.
gnuradio3_7Minimal = gnuradio3_7-unwrapped.override { gnuradio3_8Minimal = gnuradio3_8.override {
features = { wrap = false;
gnuradio-companion = false; unwrapped = gnuradio3_8.unwrapped.override {
python-support = false; volk = volk.override {
gr-ctrlport = false; enableModTool = false;
gr-qtgui = false; };
gr-utils = false; features = {
sphinx = false; gnuradio-companion = false;
doxygen = false; python-support = false;
gr-wxgui = false; examples = false;
gr-qtgui = false;
gr-utils = false;
gr-modtool = false;
sphinx = false;
doxygen = false;
};
}; };
}; };
gnuradio3_7 = callPackage ../applications/radio/gnuradio/wrapper.nix { gnuradio3_7 = callPackage ../applications/radio/gnuradio/wrapper.nix {
unwrapped = gnuradio3_7-unwrapped; unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix {
inherit (darwin.apple_sdk.frameworks) CoreAudio;
python = python2;
# Incompatible with uhd4+
uhd = uhd3_5;
};
};
gnuradio3_7Packages = lib.recurseIntoAttrs gnuradio3_7.pkgs;
# A build without gui components and other utilites not needed if gnuradio is
# used as a c++ library.
gnuradio3_7Minimal = gnuradio3_7.override {
wrap = false;
unwrapped = gnuradio3_7.unwrapped.override {
volk = volk.override {
enableModTool = false;
};
features = {
gnuradio-companion = false;
python-support = false;
gr-qtgui = false;
gr-utils = false;
sphinx = false;
doxygen = false;
gr-wxgui = false;
};
};
}; };
grandorgue = callPackage ../applications/audio/grandorgue { }; grandorgue = callPackage ../applications/audio/grandorgue { };
gr-nacl = callPackage ../applications/radio/gnuradio/nacl.nix {
gnuradio = gnuradio3_7-unwrapped;
};
gr-gsm = callPackage ../applications/radio/gnuradio/gsm.nix {
gnuradio = gnuradio3_7-unwrapped;
};
gr-ais = callPackage ../applications/radio/gnuradio/ais.nix {
gnuradio = gnuradio3_7-unwrapped;
};
gr-limesdr = callPackage ../applications/radio/gnuradio/limesdr.nix {
gnuradio = gnuradio3_7-unwrapped;
};
gr-rds = callPackage ../applications/radio/gnuradio/rds.nix {
gnuradio = gnuradio3_7-unwrapped;
};
gr-osmosdr = callPackage ../applications/radio/gnuradio/osmosdr.nix {
gnuradio = gnuradio3_7-unwrapped;
};
goldendict = libsForQt5.callPackage ../applications/misc/goldendict { goldendict = libsForQt5.callPackage ../applications/misc/goldendict {
inherit (darwin) libiconv; inherit (darwin) libiconv;
}; };
@ -22440,14 +22455,7 @@ in
gpx = callPackage ../applications/misc/gpx { }; gpx = callPackage ../applications/misc/gpx { };
gqrx = libsForQt514.callPackage ../applications/radio/gqrx { gqrx = callPackage ../applications/radio/gqrx { };
gnuradio = gnuradio3_7Minimal;
# Use the same gnuradio for gr-osmosdr as well
gr-osmosdr = gr-osmosdr.override {
gnuradio = gnuradio3_7Minimal;
pythonSupport = false;
};
};
gpx-viewer = callPackage ../applications/misc/gpx-viewer { }; gpx-viewer = callPackage ../applications/misc/gpx-viewer { };
@ -23295,9 +23303,7 @@ in
inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {}); inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {});
inspectrum = libsForQt514.callPackage ../applications/radio/inspectrum { inspectrum = callPackage ../applications/radio/inspectrum { };
gnuradio = gnuradioMinimal;
};
ion3 = callPackage ../applications/window-managers/ion-3 { ion3 = callPackage ../applications/window-managers/ion-3 {
lua = lua5_1; lua = lua5_1;

View file

@ -0,0 +1,47 @@
{ lib
, stdenv
, newScope
, gnuradio # unwrapped gnuradio
}:
lib.makeScope newScope ( self:
let
# Modeled after qt's
mkDerivationWith = import ../development/gnuradio-modules/mkDerivation.nix {
inherit lib;
unwrapped = gnuradio;
};
mkDerivation = mkDerivationWith stdenv.mkDerivation;
callPackage = self.newScope {
inherit (gnuradio)
# Packages that are potentially overriden and used as deps here.
boost
uhd
volk
;
inherit mkDerivationWith mkDerivation;
};
in {
inherit callPackage mkDerivation mkDerivationWith;
### Packages
inherit gnuradio;
osmosdr = callPackage ../development/gnuradio-modules/osmosdr/default.nix { };
ais = callPackage ../development/gnuradio-modules/ais/default.nix { };
gsm = callPackage ../development/gnuradio-modules/gsm/default.nix { };
nacl = callPackage ../development/gnuradio-modules/nacl/default.nix { };
rds = callPackage ../development/gnuradio-modules/rds/default.nix { };
limesdr = callPackage ../development/gnuradio-modules/limesdr/default.nix { };
})