Merge pull request #330477 from doronbehar/pkg/volk3
volk: 3.0.0 -> 3.1.2
This commit is contained in:
@@ -296,7 +296,7 @@ stdenv.mkDerivation (finalAttrs: (shared // {
|
||||
# This is the only python reference worth removing, if needed (3.7 doesn't
|
||||
# set that reference).
|
||||
+ lib.optionalString (!hasFeature "python-support") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
''
|
||||
;
|
||||
}))
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
{ lib, stdenv
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, orc
|
||||
, boost
|
||||
, log4cpp
|
||||
, mpir
|
||||
, doxygen
|
||||
, python
|
||||
, codec2
|
||||
, gsm
|
||||
, fftwFloat
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
, CoreAudio
|
||||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, soapysdr
|
||||
, libsodium
|
||||
, libsndfile
|
||||
, libunwind
|
||||
, thrift
|
||||
, cppzmq
|
||||
# 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"
|
||||
, version ? "3.9.8.0"
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "sha256-0umGUOjD5l84CBBeDy1uFgUyEDpI9o9/SEQ8BZm22j4=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
native = [
|
||||
cmake
|
||||
pkg-config
|
||||
orc
|
||||
];
|
||||
runtime = [
|
||||
volk
|
||||
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")) [ icu ];
|
||||
pythonNative = with python.pkgs; [
|
||||
mako
|
||||
six
|
||||
];
|
||||
};
|
||||
doxygen = {
|
||||
native = [ doxygen ];
|
||||
cmakeEnableFlag = "DOXYGEN";
|
||||
};
|
||||
man-pages = {
|
||||
cmakeEnableFlag = "MANPAGES";
|
||||
};
|
||||
python-support = {
|
||||
pythonRuntime = [ python.pkgs.six ];
|
||||
native = [
|
||||
python
|
||||
];
|
||||
cmakeEnableFlag = "PYTHON";
|
||||
};
|
||||
testing-support = {
|
||||
native = [ cppunit ];
|
||||
cmakeEnableFlag = "TESTING";
|
||||
};
|
||||
post-install = {
|
||||
cmakeEnableFlag = "POSTINSTALL";
|
||||
};
|
||||
gnuradio-runtime = {
|
||||
cmakeEnableFlag = "GNURADIO_RUNTIME";
|
||||
pythonRuntime = [
|
||||
python.pkgs.pybind11
|
||||
];
|
||||
};
|
||||
gr-ctrlport = {
|
||||
runtime = [
|
||||
libunwind
|
||||
thrift
|
||||
];
|
||||
pythonRuntime = [
|
||||
python.pkgs.thrift
|
||||
# For gr-perf-monitorx
|
||||
python.pkgs.matplotlib
|
||||
python.pkgs.networkx
|
||||
];
|
||||
cmakeEnableFlag = "GR_CTRLPORT";
|
||||
};
|
||||
gnuradio-companion = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
pyyaml
|
||||
mako
|
||||
numpy
|
||||
pygobject3
|
||||
];
|
||||
native = [
|
||||
python.pkgs.pytest
|
||||
];
|
||||
runtime = [
|
||||
gtk3
|
||||
pango
|
||||
gobject-introspection
|
||||
cairo
|
||||
libsndfile
|
||||
];
|
||||
cmakeEnableFlag = "GRC";
|
||||
};
|
||||
jsonyaml_blocks = {
|
||||
pythonRuntime = [
|
||||
python.pkgs.jsonschema
|
||||
];
|
||||
cmakeEnableFlag = "JSONYAML_BLOCKS";
|
||||
};
|
||||
gr-blocks = {
|
||||
cmakeEnableFlag = "GR_BLOCKS";
|
||||
runtime = [
|
||||
libsndfile
|
||||
];
|
||||
};
|
||||
gr-fec = {
|
||||
cmakeEnableFlag = "GR_FEC";
|
||||
};
|
||||
gr-fft = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FFT";
|
||||
};
|
||||
gr-filter = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FILTER";
|
||||
pythonRuntime = with python.pkgs; [
|
||||
scipy
|
||||
pyqtgraph
|
||||
pyqt5
|
||||
];
|
||||
};
|
||||
gr-analog = {
|
||||
cmakeEnableFlag = "GR_ANALOG";
|
||||
};
|
||||
gr-digital = {
|
||||
cmakeEnableFlag = "GR_DIGITAL";
|
||||
};
|
||||
gr-dtv = {
|
||||
cmakeEnableFlag = "GR_DTV";
|
||||
};
|
||||
gr-audio = {
|
||||
runtime = []
|
||||
++ lib.optionals stdenv.isLinux [ alsa-lib 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-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
|
||||
];
|
||||
cmakeEnableFlag = "GR_MODTOOL";
|
||||
};
|
||||
gr-blocktool = {
|
||||
cmakeEnableFlag = "GR_BLOCKTOOL";
|
||||
};
|
||||
gr-video-sdl = {
|
||||
runtime = [ SDL ];
|
||||
cmakeEnableFlag = "GR_VIDEO_SDL";
|
||||
};
|
||||
gr-vocoder = {
|
||||
runtime = [ codec2 gsm ];
|
||||
cmakeEnableFlag = "GR_VOCODER";
|
||||
};
|
||||
gr-wavelet = {
|
||||
cmakeEnableFlag = "GR_WAVELET";
|
||||
runtime = [ gsl libsodium ];
|
||||
};
|
||||
gr-zeromq = {
|
||||
runtime = [ cppzmq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
pythonRuntime = [
|
||||
# Will compile without this, but it is required by tests, and by some
|
||||
# gr blocks.
|
||||
python.pkgs.pyzmq
|
||||
];
|
||||
};
|
||||
gr-network = {
|
||||
cmakeEnableFlag = "GR_NETWORK";
|
||||
};
|
||||
gr-soapy = {
|
||||
cmakeEnableFlag = "GR_SOAPY";
|
||||
runtime = [
|
||||
soapysdr
|
||||
];
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
stdenv
|
||||
lib
|
||||
python
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
version
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
;
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared.passthru) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: (shared // {
|
||||
inherit pname version;
|
||||
# Will still evaluate correctly if not used here. It only helps nix-update
|
||||
# find the right file in which version is defined.
|
||||
inherit (shared) src;
|
||||
# Remove failing tests
|
||||
preConfigure = (shared.preConfigure or "") + ''
|
||||
# https://github.com/gnuradio/gnuradio/issues/3801
|
||||
rm gr-blocks/python/blocks/qa_cpp_py_binding.py
|
||||
rm gr-blocks/python/blocks/qa_cpp_py_binding_set.py
|
||||
rm gr-blocks/python/blocks/qa_ctrlport_probes.py
|
||||
'';
|
||||
patches = [
|
||||
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
|
||||
./modtool-newmod-permissions.3_9.patch
|
||||
# Fix compilation with GCC 13
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/fe1b3592776c26e349e9985d47d3178568dfe6ec.patch";
|
||||
hash = "sha256-bu6fJuUo/i4kM+cZqSw8moB0ymoSVooLfwUIW+WDpWI=";
|
||||
})
|
||||
];
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overridden and are used inside GR plugins - the same version must
|
||||
inherit
|
||||
boost
|
||||
volk
|
||||
;
|
||||
# Used by many gnuradio modules, the same attribute is present in
|
||||
# gnuradio3.10 where there it's spdlog.
|
||||
logLib = log4cpp;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd") {
|
||||
inherit uhd;
|
||||
} // 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") ''
|
||||
${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${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
''
|
||||
;
|
||||
}))
|
||||
@@ -312,9 +312,9 @@ stdenv.mkDerivation (finalAttrs: (shared // {
|
||||
postInstall = shared.postInstall
|
||||
# This is the only python reference worth removing, if needed.
|
||||
+ 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${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
''
|
||||
;
|
||||
}))
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
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'))
|
||||
@@ -38,7 +38,7 @@ in {
|
||||
sha256 = sourceSha256;
|
||||
}
|
||||
;
|
||||
nativeBuildInputs = lib.flatten (lib.mapAttrsToList (
|
||||
nativeBuildInputs = [ removeReferencesTo ] ++ lib.flatten (lib.mapAttrsToList (
|
||||
feat: info: (
|
||||
lib.optionals (hasFeature feat) (
|
||||
(lib.optionals (builtins.hasAttr "native" info) info.native) ++
|
||||
@@ -85,11 +85,11 @@ in {
|
||||
postInstall = ""
|
||||
# Gcc references
|
||||
+ lib.optionalString (hasFeature "gnuradio-runtime") ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
''
|
||||
# Clang references in InstalledDir
|
||||
+ lib.optionalString (hasFeature "gnuradio-runtime" && stdenv.isDarwin) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/libgnuradio-runtime${stdenv.hostPlatform.extensions.sharedLibrary})
|
||||
''
|
||||
;
|
||||
# NOTE: Outputs are disabled due to upstream not using GNU InstallDIrs cmake
|
||||
|
||||
@@ -9,16 +9,17 @@
|
||||
, soapysdr-with-plugins
|
||||
, libxml2
|
||||
, volk
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "suscan";
|
||||
version = "unstable-2022-07-05";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "BatchDrake";
|
||||
repo = "suscan";
|
||||
rev = "37dad542b97aff24654f0bb80fb8e85af7cb84ab";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-h1ogtYjkqiHb1/NAJfJ0HQIvGnZM2K/PSP5nqLXUf9M=";
|
||||
};
|
||||
|
||||
@@ -38,6 +39,7 @@ stdenv.mkDerivation rec {
|
||||
soapysdr-with-plugins
|
||||
libxml2
|
||||
volk
|
||||
zlib
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
python3,
|
||||
enableModTool ? true,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "volk";
|
||||
version = "3.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnuradio";
|
||||
repo = "volk";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-R1FT5sbl0fAAl6YIX5aD5CiQ/AjZkCSDPPQPiuy4WBY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [
|
||||
# https://github.com/gnuradio/volk/pull/766
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/volk/commit/e46771a739658b5483c25ee1203587bf07468c4d.patch";
|
||||
hash = "sha256-33V6lA4Ch50o2E7HPUMQ2NPqHXx/i6FUbz3vIaQa9Wc=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [ (lib.cmakeBool "ENABLE_MODTOOL" enableModTool) ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
python3.pkgs.mako
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://libvolk.org/";
|
||||
description = "Vector Optimized Library of Kernels";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
python311,
|
||||
enableModTool ? true,
|
||||
removeReferencesTo,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "volk";
|
||||
# Version 2.5.1 seems to cause a build issue for aarch64-darwin[1], and for
|
||||
# gnuradio 3.8 on all platforms[2]. Hence we pin this package to 2.5.0 and
|
||||
# use it for GR 3.8 for all platforms.
|
||||
#
|
||||
# [1]: https://github.com/NixOS/nixpkgs/pull/160152#issuecomment-1043380478A
|
||||
# [2]: https://github.com/NixOS/nixpkgs/pull/330477#issuecomment-2254477735
|
||||
version = "2.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnuradio";
|
||||
repo = "volk";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/macports/macports-ports/e83a55ef196d4283be438c052295b2fc44f3df5b/science/volk/files/patch-cpu_features-add-support-for-ARM64.diff";
|
||||
sha256 = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI=";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags =
|
||||
[ (lib.cmakeBool "ENABLE_MODTOOL" enableModTool) ]
|
||||
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
# offset 14335 in1: -1.03372 in2: -1.03371 tolerance was: 1e-05
|
||||
# volk_32f_log2_32f: fail on arch neon
|
||||
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||
remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
# This version of the project wasn't updated to use Python 3.12 which
|
||||
# doesn't include the deprecated distutils module.
|
||||
python311
|
||||
python311.pkgs.mako
|
||||
removeReferencesTo
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://libvolk.org/";
|
||||
description = "Vector Optimized Library of Kernels (version 2.5.0 - for GR 3.8)";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
};
|
||||
})
|
||||
@@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
@@ -57,6 +58,9 @@ mkDerivation rec {
|
||||
homepage = "https://github.com/bistromath/gr-ais";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
# rpcserver_aggregator.h:111:54: error: no template named 'unary_function'
|
||||
# in namespace 'std'; did you mean '__unary_function'?
|
||||
broken = stdenv.isDarwin;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, python3
|
||||
, enableModTool ? true
|
||||
, removeReferencesTo
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "volk";
|
||||
# Version 2.5.1 seems to cause a build issue for aarch64-darwin, see:
|
||||
# https://github.com/NixOS/nixpkgs/pull/160152#issuecomment-1043380478A
|
||||
version = "2.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnuradio";
|
||||
repo = "volk";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/macports/macports-ports/e83a55ef196d4283be438c052295b2fc44f3df5b/science/volk/files/patch-cpu_features-add-support-for-ARM64.diff";
|
||||
sha256 = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI=";
|
||||
extraPrefix = "";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals (!enableModTool) [
|
||||
"-DENABLE_MODTOOL=OFF"
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
# offset 14335 in1: -1.03372 in2: -1.03371 tolerance was: 1e-05
|
||||
# volk_32f_log2_32f: fail on arch neon
|
||||
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||
${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 = "Vector Optimized Library of Kernels";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -1,58 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, python3
|
||||
, enableModTool ? true
|
||||
, removeReferencesTo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "volk";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnuradio";
|
||||
repo = "volk";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-kI4IuO6TLplo5lLAGIPWQWtePcjIEWB9XaJDA6WlqSg=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [
|
||||
# Remove a failing test
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/volk/commit/fe2e4a73480bf2ac2e566052ea682817dddaf61f.patch";
|
||||
hash = "sha256-Vko/Plk7u6UAr32lieU+T9G34Dkg9EW3Noi/NArpRL4=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals (!enableModTool) [
|
||||
"-DENABLE_MODTOOL=OFF"
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
"-DVOLK_CPU_FEATURES=OFF"
|
||||
# offset 17912 in1: -0.0366274 in2: -0.0366173 tolerance was: 1e-05
|
||||
# volk_32f_log2_32f: fail on arch neon
|
||||
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||
${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 = "Vector Optimized Library of Kernels";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
@@ -562,6 +562,9 @@ mapAliases ({
|
||||
|
||||
gnome3 = gnome; # Added 2021-05-07
|
||||
gnuradio3_7 = throw "gnuradio3_7 has been removed because it required Python 2"; # Added 2022-01-16
|
||||
gnuradio3_9 = throw "gnuradio3_9 has been removed because it is not compatible with the latest volk and it had no dependent packages which justified it's distribution"; # Added 2024-07-28
|
||||
gnuradio3_9Minimal = throw "gnuradio3_9Minimal has been removed because it is not compatible with the latest volk and it had no dependent packages which justified it's distribution"; # Added 2024-07-28
|
||||
gnuradio3_9Packages = throw "gnuradio3_9Minimal has been removed because it is not compatible with the latest volk and it had no dependent packages which justified it's distribution"; # Added 2024-07-28
|
||||
gnuradio-ais = throw "'gnuradio-ais' has been renamed to/replaced by 'gnuradio3_7.pkgs.ais'"; # Converted to throw 2023-09-10
|
||||
gnuradio-gsm = throw "'gnuradio-gsm' has been renamed to/replaced by 'gnuradio3_7.pkgs.gsm'"; # Converted to throw 2023-09-10
|
||||
gnuradio-limesdr = throw "'gnuradio-limesdr' has been renamed to/replaced by 'gnuradio3_7.pkgs.limesdr'"; # Converted to throw 2023-09-10
|
||||
|
||||
@@ -7513,12 +7513,6 @@ with pkgs;
|
||||
|
||||
volctl = callPackage ../tools/audio/volctl { };
|
||||
|
||||
volk = if (stdenv.isDarwin && stdenv.isAarch64) then
|
||||
(callPackage ../development/libraries/volk/2.5.0.nix { })
|
||||
else
|
||||
(callPackage ../development/libraries/volk { })
|
||||
;
|
||||
|
||||
vorta = qt6Packages.callPackage ../applications/backup/vorta { };
|
||||
|
||||
vowpal-wabbit = callPackage ../applications/science/machine-learning/vowpal-wabbit { };
|
||||
@@ -30282,43 +30276,11 @@ with pkgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
gnuradio3_9 = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = callPackage ../applications/radio/gnuradio/3.9.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python311;
|
||||
};
|
||||
};
|
||||
gnuradio3_9Packages = lib.recurseIntoAttrs gnuradio3_9.pkgs;
|
||||
# A build without gui components and other utilites not needed for end user
|
||||
# libraries
|
||||
gnuradio3_9Minimal = gnuradio.override {
|
||||
doWrap = false;
|
||||
unwrapped = gnuradio.unwrapped.override {
|
||||
volk = volk.override {
|
||||
# So it will not reference python
|
||||
enableModTool = false;
|
||||
};
|
||||
uhd = uhdMinimal;
|
||||
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;
|
||||
# Doesn't make it reference python eventually, but makes reverse
|
||||
# depdendencies require python to use cmake files of GR.
|
||||
gr-ctrlport = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix ({
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python311;
|
||||
volk = volk_2;
|
||||
} // lib.optionalAttrs stdenv.isLinux {
|
||||
stdenv = pkgs.stdenvAdapters.useLibsFrom stdenv pkgs.gcc12Stdenv;
|
||||
});
|
||||
@@ -30329,7 +30291,7 @@ with pkgs;
|
||||
gnuradio3_8Minimal = gnuradio3_8.override {
|
||||
doWrap = false;
|
||||
unwrapped = gnuradio3_8.unwrapped.override {
|
||||
volk = volk.override {
|
||||
volk = volk_2.override {
|
||||
enableModTool = false;
|
||||
};
|
||||
uhd = uhdMinimal;
|
||||
|
||||
Reference in New Issue
Block a user