gnuradio: 3.8 -> 3.9
Add some "3.9" attributes to srcs in gnuradio packages And update packages using GR3.8 and that are incompatible yet with GR3.9 to use GR3.8 explicitly.
This commit is contained in:
parent
650ee258fd
commit
fb024f50e5
|
@ -7,7 +7,7 @@
|
||||||
, gmock
|
, gmock
|
||||||
, openssl
|
, openssl
|
||||||
, gflags
|
, gflags
|
||||||
, gnuradio
|
, gnuradio3_8
|
||||||
, libpcap
|
, libpcap
|
||||||
, orc
|
, orc
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
, protobuf
|
, protobuf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
gnuradio.pkgs.mkDerivation rec {
|
gnuradio3_8.pkgs.mkDerivation rec {
|
||||||
pname = "gnss-sdr";
|
pname = "gnss-sdr";
|
||||||
version = "0.0.13";
|
version = "0.0.13";
|
||||||
|
|
||||||
|
@ -32,15 +32,15 @@ gnuradio.pkgs.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
gnuradio.unwrapped.python
|
gnuradio3_8.unwrapped.python
|
||||||
gnuradio.unwrapped.python.pkgs.Mako
|
gnuradio3_8.unwrapped.python.pkgs.Mako
|
||||||
gnuradio.unwrapped.python.pkgs.six
|
gnuradio3_8.unwrapped.python.pkgs.six
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gmp
|
gmp
|
||||||
armadillo
|
armadillo
|
||||||
gnuradio.unwrapped.boost
|
gnuradio3_8.unwrapped.boost
|
||||||
glog
|
glog
|
||||||
gmock
|
gmock
|
||||||
openssl
|
openssl
|
||||||
|
@ -48,13 +48,13 @@ gnuradio.pkgs.mkDerivation rec {
|
||||||
orc
|
orc
|
||||||
# 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.
|
||||||
gnuradio.unwrapped.uhd
|
gnuradio3_8.unwrapped.uhd
|
||||||
log4cpp
|
log4cpp
|
||||||
blas lapack
|
blas lapack
|
||||||
matio
|
matio
|
||||||
pugixml
|
pugixml
|
||||||
protobuf
|
protobuf
|
||||||
gnuradio.pkgs.osmosdr
|
gnuradio3_8.pkgs.osmosdr
|
||||||
libpcap
|
libpcap
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
|
@ -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,6 +22,9 @@
|
||||||
, uhd
|
, uhd
|
||||||
, SDL
|
, SDL
|
||||||
, gsl
|
, gsl
|
||||||
|
, libsodium
|
||||||
|
, libsndfile
|
||||||
|
, libunwind
|
||||||
, cppzmq
|
, cppzmq
|
||||||
, zeromq
|
, zeromq
|
||||||
# Needed only if qt-gui is disabled, from some reason
|
# Needed only if qt-gui is disabled, from some reason
|
||||||
|
@ -40,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 = {
|
||||||
|
@ -59,6 +61,7 @@ let
|
||||||
orc
|
orc
|
||||||
];
|
];
|
||||||
runtime = [
|
runtime = [
|
||||||
|
volk
|
||||||
boost
|
boost
|
||||||
log4cpp
|
log4cpp
|
||||||
mpir
|
mpir
|
||||||
|
@ -71,23 +74,13 @@ let
|
||||||
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";
|
||||||
|
@ -96,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; [
|
||||||
|
@ -115,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";
|
||||||
};
|
};
|
||||||
|
@ -180,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
|
||||||
|
@ -222,9 +232,9 @@ stdenv.mkDerivation rec {
|
||||||
inherit (shared)
|
inherit (shared)
|
||||||
version
|
version
|
||||||
src
|
src
|
||||||
hasFeature # function
|
|
||||||
nativeBuildInputs
|
nativeBuildInputs
|
||||||
buildInputs
|
buildInputs
|
||||||
|
cmakeFlags
|
||||||
disallowedReferences
|
disallowedReferences
|
||||||
stripDebugList
|
stripDebugList
|
||||||
doCheck
|
doCheck
|
||||||
|
@ -240,46 +250,16 @@ stdenv.mkDerivation rec {
|
||||||
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
|
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
|
||||||
inherit (libsForQt5) qwt;
|
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
|
postInstall = shared.postInstall
|
||||||
# This is the only python reference worth removing, if needed (3.7 doesn't
|
# This is the only python reference worth removing, if needed.
|
||||||
# set that reference).
|
# 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) ''
|
+ 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} $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
|
||||||
''
|
''
|
||||||
;
|
;
|
||||||
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";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, cmake
|
, cmake
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, qt5
|
, qt5
|
||||||
, gnuradioMinimal
|
, gnuradio3_8Minimal
|
||||||
, log4cpp
|
, log4cpp
|
||||||
, mpir
|
, mpir
|
||||||
, fftwFloat
|
, fftwFloat
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
assert pulseaudioSupport -> libpulseaudio != null;
|
assert pulseaudioSupport -> libpulseaudio != null;
|
||||||
|
|
||||||
gnuradioMinimal.pkgs.mkDerivation rec {
|
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||||
pname = "gqrx";
|
pname = "gqrx";
|
||||||
version = "2.14.4";
|
version = "2.14.4";
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ gnuradioMinimal.pkgs.mkDerivation rec {
|
||||||
fftwFloat
|
fftwFloat
|
||||||
alsaLib
|
alsaLib
|
||||||
libjack2
|
libjack2
|
||||||
gnuradioMinimal.unwrapped.boost
|
gnuradio3_8Minimal.unwrapped.boost
|
||||||
qt5.qtbase
|
qt5.qtbase
|
||||||
qt5.qtsvg
|
qt5.qtsvg
|
||||||
gnuradioMinimal.pkgs.osmosdr
|
gnuradio3_8Minimal.pkgs.osmosdr
|
||||||
rtl-sdr
|
rtl-sdr
|
||||||
hackrf
|
hackrf
|
||||||
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
|
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
, gnuradioMinimal
|
, gnuradio3_8Minimal
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, cmake
|
, cmake
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
, liquid-dsp
|
, liquid-dsp
|
||||||
}:
|
}:
|
||||||
|
|
||||||
gnuradioMinimal.pkgs.mkDerivation rec {
|
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||||
pname = "inspectrum";
|
pname = "inspectrum";
|
||||||
version = "0.2.3";
|
version = "0.2.3";
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, libpulseaudio
|
, libpulseaudio
|
||||||
, libconfig
|
, libconfig
|
||||||
# Needs a gnuradio built with qt gui support
|
# Needs a gnuradio built with qt gui support
|
||||||
, gnuradio
|
, gnuradio3_8
|
||||||
# Not gnuradioPackages'
|
# Not gnuradioPackages'
|
||||||
, codec2
|
, codec2
|
||||||
, log4cpp
|
, log4cpp
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
, speexdsp
|
, speexdsp
|
||||||
}:
|
}:
|
||||||
|
|
||||||
gnuradio.pkgs.mkDerivation rec {
|
gnuradio3_8.pkgs.mkDerivation rec {
|
||||||
pname = "qradiolink";
|
pname = "qradiolink";
|
||||||
version = "0.8.5-2";
|
version = "0.8.5-2";
|
||||||
|
|
||||||
|
@ -44,28 +44,28 @@ gnuradio.pkgs.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gnuradio.unwrapped.boost
|
gnuradio3_8.unwrapped.boost
|
||||||
codec2
|
codec2
|
||||||
log4cpp
|
log4cpp
|
||||||
gmp
|
gmp
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
libconfig
|
libconfig
|
||||||
gsm
|
gsm
|
||||||
gnuradio.pkgs.osmosdr
|
gnuradio3_8.pkgs.osmosdr
|
||||||
libopus
|
libopus
|
||||||
libjpeg
|
libjpeg
|
||||||
speex
|
speex
|
||||||
speexdsp
|
speexdsp
|
||||||
gnuradio.qt.qtbase
|
gnuradio3_8.qt.qtbase
|
||||||
gnuradio.qt.qtmultimedia
|
gnuradio3_8.qt.qtmultimedia
|
||||||
libftdi
|
libftdi
|
||||||
libsndfile
|
libsndfile
|
||||||
gnuradio.qwt
|
gnuradio3_8.qwt
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
protobuf
|
protobuf
|
||||||
gnuradio.qt.qmake
|
gnuradio3_8.qt.qmake
|
||||||
gnuradio.qt.wrapQtAppsHook
|
gnuradio3_8.qt.wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -19,6 +19,7 @@ let
|
||||||
version = {
|
version = {
|
||||||
"3.7" = "2.0.0";
|
"3.7" = "2.0.0";
|
||||||
"3.8" = "3.0.1";
|
"3.8" = "3.0.1";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "myriadrf";
|
owner = "myriadrf";
|
||||||
|
@ -27,6 +28,7 @@ let
|
||||||
sha256 = {
|
sha256 = {
|
||||||
"3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
|
"3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
|
||||||
"3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
|
"3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
};
|
};
|
||||||
in mkDerivation {
|
in mkDerivation {
|
||||||
|
|
|
@ -24,6 +24,7 @@ let
|
||||||
version = {
|
version = {
|
||||||
"3.7" = "0.1.5";
|
"3.7" = "0.1.5";
|
||||||
"3.8" = "0.2.2";
|
"3.8" = "0.2.2";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "git://git.osmocom.org/gr-osmosdr";
|
url = "git://git.osmocom.org/gr-osmosdr";
|
||||||
|
@ -31,6 +32,7 @@ let
|
||||||
sha256 = {
|
sha256 = {
|
||||||
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
||||||
"3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs=";
|
"3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs=";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
};
|
};
|
||||||
in mkDerivation {
|
in mkDerivation {
|
||||||
|
|
|
@ -17,6 +17,7 @@ let
|
||||||
version = {
|
version = {
|
||||||
"3.7" = "1.1.0";
|
"3.7" = "1.1.0";
|
||||||
"3.8" = "3.8.0";
|
"3.8" = "3.8.0";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bastibl";
|
owner = "bastibl";
|
||||||
|
@ -25,6 +26,7 @@ let
|
||||||
sha256 = {
|
sha256 = {
|
||||||
"3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
|
"3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
|
||||||
"3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
|
"3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
|
||||||
|
"3.9" = null;
|
||||||
}.${gnuradio.versionAttr.major};
|
}.${gnuradio.versionAttr.major};
|
||||||
};
|
};
|
||||||
in mkDerivation {
|
in mkDerivation {
|
||||||
|
|
|
@ -22346,6 +22346,35 @@ in
|
||||||
# So it will not reference python
|
# So it will not reference python
|
||||||
enableModTool = false;
|
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_8 = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||||
|
unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix {
|
||||||
|
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
|
||||||
|
# used as a c++ library.
|
||||||
|
gnuradio3_8Minimal = gnuradio3_8.override {
|
||||||
|
wrap = false;
|
||||||
|
unwrapped = gnuradio3_8.unwrapped.override {
|
||||||
|
volk = volk.override {
|
||||||
|
enableModTool = false;
|
||||||
|
};
|
||||||
features = {
|
features = {
|
||||||
gnuradio-companion = false;
|
gnuradio-companion = false;
|
||||||
python-support = false;
|
python-support = false;
|
||||||
|
|
Loading…
Reference in New Issue