Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "Vc";
10 version = "0.7.5";
11
12 src = fetchFromGitHub {
13 owner = "VcDevel";
14 repo = "Vc";
15 rev = version;
16 sha256 = "190s4r2n3jsivl4j2m288j3rqmgjj6gl308hi9mzwyhcfn17q8br";
17 };
18
19 # Avoid requesting an unreasonable intrinsic
20 patches = lib.optional stdenv.cc.isClang ./vc_0_7_clang_fix.patch;
21
22 nativeBuildInputs = [ cmake ];
23
24 postPatch = ''
25 sed -i '/OptimizeForArchitecture()/d' cmake/VcMacros.cmake
26 sed -i '/AutodetectHostArchitecture()/d' print_target_architecture.cmake
27 '';
28
29 meta = with lib; {
30 description = "Library for multiprecision complex arithmetic with exact rounding";
31 homepage = "https://github.com/VcDevel/Vc";
32 license = licenses.bsd3;
33 platforms = platforms.all;
34 maintainers = with maintainers; [ abbradar ];
35 # never built on aarch64-darwin since first introduction in nixpkgs
36 broken =
37 (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
38 || (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
39 };
40}