nixpkgs/pkgs/development/libraries/volk/default.nix

43 lines
929 B
Nix
Raw Normal View History

2021-02-15 20:09:25 +00:00
{ stdenv
, lib
, fetchFromGitHub
, cmake
, python3
, enableModTool ? true
, removeReferencesTo
}:
stdenv.mkDerivation rec {
pname = "volk";
2021-06-28 10:58:44 +00:00
version = "2.5.0";
2021-02-15 20:09:25 +00:00
src = fetchFromGitHub {
owner = "gnuradio";
repo = pname;
rev = "v${version}";
2021-06-28 10:58:44 +00:00
sha256 = "XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc=";
2021-02-15 20:09:25 +00:00
fetchSubmodules = true;
};
cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ];
2021-06-28 18:47:28 +00:00
postInstall = lib.optionalString (!stdenv.isDarwin) ''
2021-02-15 20:09:25 +00:00
${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;
};
}