1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "Vc";
5 version = "1.4.3";
6
7 src = fetchFromGitHub {
8 owner = "VcDevel";
9 repo = "Vc";
10 rev = version;
11 sha256 = "sha256-fv0FHAl0xvAFybR/jwhX2LkozwEDy1TNcbVAmRRnLVU=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 postPatch = ''
17 sed -i '/OptimizeForArchitecture()/d' cmake/VcMacros.cmake
18 sed -i '/AutodetectHostArchitecture()/d' print_target_architecture.cmake
19 '';
20
21 meta = with lib; {
22 description = "Library for multiprecision complex arithmetic with exact rounding";
23 homepage = "https://github.com/VcDevel/Vc";
24 license = licenses.bsd3;
25 platforms = platforms.all;
26 maintainers = with maintainers; [ abbradar ];
27 };
28}