8ace65ff3d
* mpd-touch-screen-gui: use finalAttrs in mkDerivation; reformat * musescore: use finalAttrs in mkDerivation * syncthingtray: use stdenv.mkDerivation with a function; reformat * ocrfeeder: use finalAttrs in mkDerivation; reformat * castget: use finalAttrs in mkDerivation * gnome-network-displays: use finalAttrs in mkDerivation * mailreaders: use finalAttrs in mkDerivation * mswatch: use finalAttrs in mkDerivation * uhd: use finalAttrs in mkDerivation * maxima: use finalAttrs in mkDerivation * qalculate-gtk: use finalAttrs in mkDerivation * qalculate-qt: use finalAttrs in mkDerivation * wxmaxima: use finalAttrs in mkDerivation * lammps: use finalAttrs in mkDerivation * mlterm: use finalAttrs in mkDerivation * video-trimmer: use finalAttrs in mkDerivation * nerdfonts: use finalAttrs in mkDerivation * gnomeExtensions.easyScreenCast: use finalAttrs in mkDerivation * octave: use finalAttrs in mkDerivation; reformat * comedilib: use finalAttrs in mkDerivation * cpp-utilities: use finalAttrs in mkDerivation * libsForQt5.kpeoplevcard: use finalAttrs in mkDerivation; reformat * liberio: use finalAttrs in mkDerivation * libqalculate: use finalAttrs in mkDerivation; reformat * libwtk-sdl2: use finalAttrs in mkDerivation * libsForQt5.pulseaudio-qt: use finalAttrs in mkDerivation; reformat * qrupdate: use finalAttrs in mkDerivation; reformat * libsForQt5.qtforkawesome: use finalAttrs in mkDerivation; reformat * libsForQt5.qtutilities: use finalAttrs in mkDerivation; reformat * sqlitecpp: use finalAttrs in mkDerivation; reformat * tweeny: use finalAttrs in mkDerivation * volk: use finalAttrs in mkDerivation * wiringpi: use finalAttrs in mkDerivation * snzip: use finalAttrs in mkDerivation; reformat * bpm-tools: use finalAttrs in mkDerivation; reformat * sacd: use finalAttrs in mkDerivation * gtk-gnutella: use finalAttrs in mkDerivation; reformat * sile: use finalAttrs in mkDerivation * pplatex: use finalAttrs in mkDerivation; reformat
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{ 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 = "The Vector Optimized Library of Kernels";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|