Merge pull request #142557 from doronbehar/pkg/gnuradio/update

This commit is contained in:
Doron Behar 2021-10-27 09:49:51 +00:00 committed by GitHub
commit a63cd4a89e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 197 additions and 66 deletions

View File

@ -8,6 +8,7 @@
, openssl
, gflags
, gnuradio3_8
, thrift
, libpcap
, orc
, pkg-config
@ -21,6 +22,8 @@
gnuradio3_8.pkgs.mkDerivation rec {
pname = "gnss-sdr";
# There's an issue with cpufeatures on 0.0.15, see:
# https://github.com/NixOS/nixpkgs/pull/142557#issuecomment-950217925
version = "0.0.13";
src = fetchFromGitHub {
@ -56,6 +59,9 @@ gnuradio3_8.pkgs.mkDerivation rec {
protobuf
gnuradio3_8.pkgs.osmosdr
libpcap
] ++ lib.optionals (gnuradio3_8.hasFeature "gr-ctrlport") [
thrift
gnuradio3_8.unwrapped.python.pkgs.thrift
];
cmakeFlags = [

View File

@ -44,8 +44,6 @@
minor = "14";
patch = "0";
}
# We use our build of volk and not the one bundled with the release
, fetchSubmodules ? false
}:
let
@ -213,7 +211,6 @@ let
sourceSha256
overrideSrc
fetchFromGitHub
fetchSubmodules
;
qt = qt4;
gtk = gtk2;
@ -238,34 +235,34 @@ stdenv.mkDerivation rec {
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) {
} // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd;
};
cmakeFlags = shared.cmakeFlags
# From some reason, if these are not set, libcodec2 and gsm are
# not detected properly (slightly different then what's in
# ./default.nix).
++ lib.optionals (hasFeature "gr-vocoder" features) [
++ lib.optionals (hasFeature "gr-vocoder") [
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
"-DLIBCODEC2_INCLUDE_DIR=${codec2}/include"
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
"-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm"
]
++ lib.optionals (hasFeature "volk" features && volk != null) [
++ lib.optionals (hasFeature "volk" && volk != null) [
"-DENABLE_INTERNAL_VOLK=OFF"
]
;
stripDebugList = shared.stripDebugList
# gr-fcd feature was dropped in 3.8
++ lib.optionals (hasFeature "gr-fcd" features) [ "share/gnuradio/examples/fcd" ]
++ lib.optionals (hasFeature "gr-fcd") [ "share/gnuradio/examples/fcd" ]
;
preConfigure = ""
# wxgui and pygtk are not looked up properly, so we force them to be
# detected as found, if they are requested by the `features` attrset.
+ lib.optionalString (hasFeature "gr-wxgui" features) ''
+ lib.optionalString (hasFeature "gr-wxgui") ''
sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt
''
+ lib.optionalString (hasFeature "gnuradio-companion" features) ''
+ lib.optionalString (hasFeature "gnuradio-companion") ''
sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt
''
;

View File

@ -1,5 +1,6 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
# Remove gcc and python references
, removeReferencesTo
@ -15,6 +16,7 @@
, python
, codec2
, gsm
, thrift
, fftwFloat
, alsa-lib
, libjack2
@ -41,15 +43,13 @@
, pname ? "gnuradio"
, versionAttr ? {
major = "3.8";
minor = "3";
patch = "1";
minor = "4";
patch = "0";
}
# We use our build of volk and not the one bundled with the release
, fetchSubmodules ? false
}:
let
sourceSha256 = "0vd39azp8n576dbqsanax7bgsnxwc80riaxid2ihxs4xzyjmbw9r";
sourceSha256 = "sha256-C8S3iF7vj9A8SpxriW9y7idrhXzonvenoQtVAMex+Iw=";
featuresInfo = {
# Needed always
basic = {
@ -65,7 +65,7 @@ let
]
# when gr-qtgui is disabled, icu needs to be included, otherwise
# building with boost 1.7x fails
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ];
pythonNative = with python.pkgs; [
Mako
six
@ -101,13 +101,19 @@ let
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
];
runtime = [
thrift
];
pythonRuntime = with python.pkgs; [
python.pkgs.thrift
# For gr-perf-monitorx
matplotlib
networkx
];
};
gnuradio-companion = {
pythonRuntime = with python.pkgs; [
@ -171,9 +177,14 @@ let
};
gr-utils = {
cmakeEnableFlag = "GR_UTILS";
pythonRuntime = with python.pkgs; [
# For gr_plot
matplotlib
];
};
gr-modtool = {
pythonRuntime = with python.pkgs; [
setuptools
click
click-plugins
];
@ -208,7 +219,6 @@ let
sourceSha256
overrideSrc
fetchFromGitHub
fetchSubmodules
;
qt = qt5;
gtk = gtk3;
@ -230,12 +240,21 @@ stdenv.mkDerivation rec {
dontWrapQtApps
meta
;
patches = [
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
./modtool-newmod-permissions.3_8.patch
(fetchpatch {
# https://github.com/gnuradio/gnuradio/pull/5226
url = "https://github.com/gnuradio/gnuradio/commit/9d7343526dd793120b6425cd9a6969416ed32503.patch";
sha256 = "sha256-usSoRDDuClUfdX4yFbQNu8wDzve6UEhZYTFj1oZbFic=";
})
];
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) {
} // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
} // lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit (libsForQt5) qwt;
};
cmakeFlags = shared.cmakeFlags
@ -246,7 +265,7 @@ stdenv.mkDerivation rec {
#
# 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) [
++ lib.optionals (hasFeature "gr-vocoder") [
"-DLIBCODEC2_FOUND=TRUE"
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
@ -255,7 +274,7 @@ stdenv.mkDerivation rec {
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
]
++ lib.optionals (hasFeature "volk" features && volk != null) [
++ lib.optionals (hasFeature "volk" && volk != null) [
"-DENABLE_INTERNAL_VOLK=OFF"
]
;
@ -263,7 +282,7 @@ stdenv.mkDerivation rec {
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) ''
+ lib.optionalString (!hasFeature "python-support") ''
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
''
;

View File

@ -26,6 +26,7 @@
, libsodium
, libsndfile
, libunwind
, thrift
, cppzmq
, zeromq
# Needed only if qt-gui is disabled, from some reason
@ -45,14 +46,13 @@
, pname ? "gnuradio"
, versionAttr ? {
major = "3.9";
minor = "2";
minor = "3";
patch = "0";
}
, fetchSubmodules ? false
}:
let
sourceSha256 = "01wyqazrpphmb0fl69j93k0w4vm4d1l4177m1fyg7qx8hzia0aaq";
sourceSha256 = "sha256-jVfExv1CcnlOaaj/XtnfhWAHnQsshZJ1l/zXo0uovdo=";
featuresInfo = {
# Needed always
basic = {
@ -69,7 +69,7 @@ let
]
# when gr-qtgui is disabled, icu needs to be included, otherwise
# building with boost 1.7x fails
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
++ lib.optionals (!(hasFeature "gr-qtgui")) [ icu ];
pythonNative = with python.pkgs; [
Mako
six
@ -100,11 +100,15 @@ let
];
};
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.9.0.0/gnuradio-runtime/lib/controlport/thrift/README
runtime = [
libunwind
thrift
];
pythonRuntime = with python.pkgs; [
python.pkgs.thrift
# For gr-perf-monitorx
matplotlib
networkx
];
cmakeEnableFlag = "GR_CTRLPORT";
};
@ -140,6 +144,10 @@ let
gr-filter = {
runtime = [ fftwFloat ];
cmakeEnableFlag = "GR_FILTER";
pythonRuntime = with python.pkgs; [
scipy
pyqtgraph
];
};
gr-analog = {
cmakeEnableFlag = "GR_ANALOG";
@ -174,11 +182,22 @@ let
];
cmakeEnableFlag = "GR_UHD";
};
gr-uhd-rfnoc = {
runtime = [
uhd
];
cmakeEnableFlag = "UHD_RFNOC";
};
gr-utils = {
cmakeEnableFlag = "GR_UTILS";
pythonRuntime = with python.pkgs; [
# For gr_plot
matplotlib
];
};
gr-modtool = {
pythonRuntime = with python.pkgs; [
setuptools
click
click-plugins
];
@ -225,7 +244,6 @@ let
sourceSha256
overrideSrc
fetchFromGitHub
fetchSubmodules
;
qt = qt5;
gtk = gtk3;
@ -248,18 +266,27 @@ stdenv.mkDerivation rec {
dontWrapQtApps
meta
;
patches = [
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
./modtool-newmod-permissions.patch
(fetchpatch {
# https://github.com/gnuradio/gnuradio/pull/5225
url = "https://github.com/gnuradio/gnuradio/commit/4cef46e3ea0faf04e05ca1a5846cd1568fa51bb2.patch";
sha256 = "sha256-6AlGbtD1S0c3I9JSoLTMP4YqwDU17i2j+XRkuR+QTuc=";
})
];
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) {
} // lib.optionalAttrs (hasFeature "gr-uhd") {
inherit uhd;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
} // lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit (libsForQt5) qwt;
};
postInstall = shared.postInstall
# This is the only python reference worth removing, if needed.
+ lib.optionalString (!hasFeature "python-support" features) ''
+ lib.optionalString (!hasFeature "python-support") ''
${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

@ -0,0 +1,26 @@
commit bf870157e0a9c3d19e968afb276b4e7d96b4df30
Author: Doron Behar <doron.behar@gmail.com>
Date: Thu Oct 21 13:10:42 2021 +0300
gr-modtool: Don't copy source permissions
This is needed for systems such as NixOS, where the build tree isn't
writable and the files copied should be.
Signed-off-by: Doron Behar <doron.behar@gmail.com>
diff --git a/gr-utils/python/modtool/core/newmod.py b/gr-utils/python/modtool/core/newmod.py
index 123059907..0c734e7ae 100644
--- a/gr-utils/python/modtool/core/newmod.py
+++ b/gr-utils/python/modtool/core/newmod.py
@@ -78,7 +78,9 @@ class ModToolNewModule(ModTool):
self._setup_scm(mode='new')
logger.info("Creating out-of-tree module in {}...".format(self.dir))
try:
- shutil.copytree(self.srcdir, self.dir)
+ # https://stackoverflow.com/a/17022146/4935114
+ shutil.copystat = lambda x, y: x
+ shutil.copytree(self.srcdir, self.dir, copy_function=shutil.copyfile)
os.chdir(self.dir)
except OSError:
raise ModToolException('Could not create directory {}.'.format(self.dir))

View File

@ -0,0 +1,15 @@
diff --git c/gr-utils/modtool/core/newmod.py w/gr-utils/modtool/core/newmod.py
index babebfcde..9a02f663e 100644
--- c/gr-utils/modtool/core/newmod.py
+++ w/gr-utils/modtool/core/newmod.py
@@ -62,7 +62,9 @@ class ModToolNewModule(ModTool):
self._setup_scm(mode='new')
logger.info(f"Creating out-of-tree module in {self.dir}...")
try:
- shutil.copytree(self.srcdir, self.dir)
+ # https://stackoverflow.com/a/17022146/4935114
+ shutil.copystat = lambda x, y: x
+ shutil.copytree(self.srcdir, self.dir, copy_function=shutil.copyfile)
try:
shutil.copyfile(os.path.join(gr.prefix(), 'share', 'gnuradio', 'clang-format.conf'),
os.path.join(self.dir, '.clang-format'))

View File

@ -11,7 +11,6 @@
# the main expressions
, overrideSrc
, fetchFromGitHub
, fetchSubmodules
}:
rec {
@ -26,12 +25,11 @@ rec {
owner = "gnuradio";
rev = "v${version}";
sha256 = sourceSha256;
inherit fetchSubmodules;
}
;
# Check if a feature is enabled, while defaulting to true if feat is not
# specified.
hasFeature = feat: features: (
hasFeature = feat: (
if builtins.hasAttr feat features then
features.${feat}
else
@ -39,7 +37,7 @@ rec {
);
nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
feat: info: (
if hasFeature feat features then
if hasFeature feat then
(if builtins.hasAttr "native" info then info.native else []) ++
(if builtins.hasAttr "pythonNative" info then info.pythonNative else [])
else
@ -48,7 +46,7 @@ rec {
) featuresInfo);
buildInputs = lib.flatten (lib.mapAttrsToList (
feat: info: (
if hasFeature feat features then
if hasFeature feat then
(if builtins.hasAttr "runtime" info then info.runtime else []) ++
(if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else [])
else
@ -63,7 +61,7 @@ rec {
# satisfied, let only our cmakeFlags decide.
"-DENABLE_DEFAULT=OFF"
else
if hasFeature feat features then
if hasFeature feat then
"-DENABLE_${info.cmakeEnableFlag}=ON"
else
"-DENABLE_${info.cmakeEnableFlag}=OFF"
@ -75,17 +73,17 @@ rec {
stdenv.cc.cc
]
# If python-support is disabled, we probably don't want it referenced
++ lib.optionals (!hasFeature "python-support" features) [ python ]
++ lib.optionals (!hasFeature "python-support") [ python ]
;
# Gcc references from examples
stripDebugList = [ "lib" "bin" ]
++ lib.optionals (hasFeature "gr-audio" features) [ "share/gnuradio/examples/audio" ]
++ lib.optionals (hasFeature "gr-uhd" features) [ "share/gnuradio/examples/uhd" ]
++ lib.optionals (hasFeature "gr-qtgui" features) [ "share/gnuradio/examples/qt-gui" ]
++ lib.optionals (hasFeature "gr-audio") [ "share/gnuradio/examples/audio" ]
++ lib.optionals (hasFeature "gr-uhd") [ "share/gnuradio/examples/uhd" ]
++ lib.optionals (hasFeature "gr-qtgui") [ "share/gnuradio/examples/qt-gui" ]
;
postInstall = ""
# Gcc references
+ lib.optionalString (hasFeature "gnuradio-runtime" features) ''
+ lib.optionalString (hasFeature "gnuradio-runtime") ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so)
''
;
@ -101,9 +99,9 @@ rec {
featuresInfo
python
;
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
} // lib.optionalAttrs (hasFeature "gr-qtgui") {
inherit qt;
} // lib.optionalAttrs (hasFeature "gnuradio-companion" features) {
} // lib.optionalAttrs (hasFeature "gnuradio-companion") {
inherit gtk;
};
# Wrapping is done with an external wrapper

View File

@ -33,25 +33,20 @@
}:
let
# We don't check if `python-support` feature is on, as it's unlikely someone
# may wish to wrap GR without python support.
pythonPkgs = extraPythonPackages
++ [ (unwrapped.python.pkgs.toPythonModule unwrapped) ]
# Add the extraPackages as python modules as well
++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
++ lib.flatten (lib.mapAttrsToList (
feat: info: (
if unwrapped.hasFeature feat unwrapped.features then
if unwrapped.hasFeature feat then
(if builtins.hasAttr "pythonRuntime" info then info.pythonRuntime else [])
else
[]
)
) unwrapped.featuresInfo)
++ lib.optionals
(unwrapped.hasFeature "python-support" unwrapped.features)
(
# 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)
)
;
pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs);
@ -60,8 +55,8 @@ let
]
# Emulating wrapGAppsHook & wrapQtAppsHook working together
++ lib.optionals (
(unwrapped.hasFeature "gnuradio-companion" unwrapped.features)
|| (unwrapped.hasFeature "gr-qtgui" unwrapped.features)
(unwrapped.hasFeature "gnuradio-companion")
|| (unwrapped.hasFeature "gr-qtgui")
) [
"--prefix" "XDG_DATA_DIRS" ":" "$out/share"
"--prefix" "XDG_DATA_DIRS" ":" "$out/share/gsettings-schemas/${name}"
@ -71,7 +66,7 @@ let
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1764890.html
"--prefix" "PATH" ":" "${lib.getBin glib}/bin"
]
++ lib.optionals (unwrapped.hasFeature "gnuradio-companion" unwrapped.features) [
++ lib.optionals (unwrapped.hasFeature "gnuradio-companion") [
"--set" "GDK_PIXBUF_MODULE_FILE" "${librsvg}/${gdk-pixbuf.moduleDir}.cache"
"--prefix" "GIO_EXTRA_MODULES" ":" "${lib.getLib dconf}/lib/gio/modules"
"--prefix" "XDG_DATA_DIRS" ":" "${unwrapped.gtk}/share"
@ -94,7 +89,7 @@ let
++ lib.optionals (extraPackages != []) [
"--prefix" "GRC_BLOCKS_PATH" ":" "${lib.makeSearchPath "share/gnuradio/grc/blocks" extraPackages}"
]
++ lib.optionals (unwrapped.hasFeature "gr-qtgui" unwrapped.features)
++ lib.optionals (unwrapped.hasFeature "gr-qtgui")
# 3.7 builds with qt4
(if lib.versionAtLeast unwrapped.versionAttr.major "3.8" then
[

View File

@ -4,6 +4,7 @@
, pkg-config
, qt5
, gnuradio3_8Minimal
, thrift
, log4cpp
, mpir
, fftwFloat
@ -45,6 +46,9 @@ gnuradio3_8Minimal.pkgs.mkDerivation rec {
gnuradio3_8Minimal.pkgs.osmosdr
rtl-sdr
hackrf
] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [
thrift
gnuradio3_8Minimal.unwrapped.python.pkgs.thrift
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
postInstall = ''

View File

@ -1,5 +1,6 @@
{ lib
, gnuradio3_8Minimal
, thrift
, fetchFromGitHub
, pkg-config
, cmake
@ -28,6 +29,9 @@ gnuradio3_8Minimal.pkgs.mkDerivation rec {
fftwFloat
liquid-dsp
qt5.qtbase
] ++ lib.optionals (gnuradio3_8Minimal.hasFeature "gr-ctrlport") [
thrift
gnuradio3_8Minimal.unwrapped.python.pkgs.thrift
];
meta = with lib; {

View File

@ -4,6 +4,7 @@
, libconfig
# Needs a gnuradio built with qt gui support
, gnuradio3_8
, thrift
# Not gnuradioPackages'
, codec2
, log4cpp
@ -61,6 +62,9 @@ gnuradio3_8.pkgs.mkDerivation rec {
libftdi
libsndfile
gnuradio3_8.qwt
] ++ lib.optionals (gnuradio3_8.hasFeature "gr-ctrlport") [
thrift
gnuradio3_8.unwrapped.python.pkgs.thrift
];
nativeBuildInputs = [
protobuf

View File

@ -2,6 +2,7 @@
, mkDerivation
, fetchFromGitHub
, gnuradio
, thrift
, cmake
, pkg-config
, doxygen
@ -49,6 +50,9 @@ in mkDerivation {
gmp
icu
limesuite
] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
thrift
python.pkgs.thrift
];
meta = with lib; {

View File

@ -8,6 +8,7 @@
, mpir
, boost
, gmp
, thrift
, fftwFloat
, python
, swig
@ -52,11 +53,14 @@ in mkDerivation {
libbladeRF
rtl-sdr
soapysdr-with-plugins
] ++ lib.optional (gnuradio.hasFeature "gr-uhd" gnuradio.features) [
] ++ lib.optionals (gnuradio.hasFeature "gr-uhd") [
uhd
] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
thrift
python.pkgs.thrift
];
cmakeFlags = [
(if (gnuradio.hasFeature "python-support" gnuradio.features) then
(if (gnuradio.hasFeature "python-support") then
"-DENABLE_PYTHON=ON"
else
"-DENABLE_PYTHON=OFF"
@ -66,7 +70,7 @@ in mkDerivation {
cmake
pkg-config
swig
] ++ lib.optionals (gnuradio.hasFeature "python-support" gnuradio.features) [
] ++ lib.optionals (gnuradio.hasFeature "python-support") [
(if (gnuradio.versionAttr.major == "3.7") then
python.pkgs.cheetah
else

View File

@ -8,6 +8,7 @@
, python
, log4cpp
, mpir
, thrift
, boost
, gmp
, icu
@ -40,6 +41,9 @@ in mkDerivation {
boost
gmp
icu
] ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [
thrift
python.pkgs.thrift
];
nativeBuildInputs = [

View File

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "thrift";
version = "0.14.2";
version = "0.15.0";
src = fetchurl {
url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-QZG/wLdJDiDMafn03G6ZH7thLUVRqp7vHb9/TEfOVU0=";
sha256 = "sha256-1Yg1ZtFh+Pbd1OIfOp4+a4JyeZ0FSCDxwlsR6GcY+Gs=";
};
# Workaround to make the python wrapper not drop this package:
@ -22,6 +22,12 @@ stdenv.mkDerivation rec {
preConfigure = "export PY_PREFIX=$out";
patches = [
# ToStringTest.cpp is failing from some reason due to locale issue, this
# doesn't disable all UnitTests as in Darwin.
./disable-failing-test.patch
];
cmakeFlags = [
"-DBUILD_JAVASCRIPT:BOOL=OFF"
"-DBUILD_NODEJS:BOOL=OFF"

View File

@ -0,0 +1,12 @@
diff --git i/lib/cpp/test/CMakeLists.txt w/lib/cpp/test/CMakeLists.txt
index 19854e1a3..9d428a166 100644
--- i/lib/cpp/test/CMakeLists.txt
+++ w/lib/cpp/test/CMakeLists.txt
@@ -77,7 +77,6 @@ set(UnitTest_SOURCES
TMemoryBufferTest.cpp
TBufferBaseTest.cpp
Base64Test.cpp
- ToStringTest.cpp
TypedefTest.cpp
TServerSocketTest.cpp
TServerTransportTest.cpp

View File

@ -24769,6 +24769,9 @@ with pkgs;
gr-blocktool = false;
sphinx = false;
doxygen = false;
# Doesn't make it reference python eventually, but makes reverse
# depdendencies require python to use cmake files of GR.
gr-ctrlport = false;
};
};
};
@ -24797,6 +24800,9 @@ with pkgs;
gr-modtool = false;
sphinx = false;
doxygen = false;
# Doesn't make it reference python eventually, but makes reverse
# depdendencies require python to use cmake files of GR.
gr-ctrlport = false;
};
};
};