arangodb_3_5: fix build on aarch64 and vanilla x86_64

This commit is contained in:
volth 2019-08-06 20:58:07 +00:00
parent 048a0acb89
commit bbb6014052

View file

@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, openssl, zlib, cmake, python2, perl, snappy, lzo, which }:
let
common = { version, sha256, platforms }: stdenv.mkDerivation {
common = { version, sha256 }: stdenv.mkDerivation {
pname = "arangodb";
inherit version;
@ -29,20 +29,18 @@ let
'';
cmakeFlags = [
# do not set GCC's -march=xxx based on builder's /proc/cpuifo
# `stdenv.hostPlatform.platform.gcc.arch` goes to -march= the usual way
# do not set GCC's -march=xxx based on builder's /proc/cpuinfo
"-DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF"
# also avoid using builder's /proc/cpuinfo
"-DHAVE_SSE42=${ { "westmere" = "ON";
"sandybridge" = "ON";
"ivybridge" = "ON";
"haswell" = "ON";
"broadwell" = "ON";
"skylake" = "ON";
"skylake-avx512" = "ON";
}.${stdenv.hostPlatform.platform.gcc.arch or ""} or "OFF"
}"
];
] ++
{ "westmere" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"sandybridge" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"ivybridge" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"haswell" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"broadwell" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"skylake" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
"skylake-avx512" = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
}.${stdenv.hostPlatform.platform.gcc.arch or ""} or [ "-DHAVE_SSE42=OFF" "-DASM_OPTIMIZATIONS=OFF" ];
enableParallelBuilding = true;
@ -50,13 +48,13 @@ let
homepage = https://www.arangodb.com;
description = "A native multi-model database with flexible data models for documents, graphs, and key-values";
license = licenses.asl20;
inherit platforms;
platforms = platforms.linux;
maintainers = [ maintainers.flosse ];
};
};
in {
arangodb_3_2 = common { version = "3.2.18"; sha256 = "05mfrx1g6dh1bzzqs23nvk0rg3v8y2dhdam4lym55pzlhqa7lf0x"; platforms = lib.platforms.linux; };
arangodb_3_3 = common { version = "3.3.23.1"; sha256 = "0bnbiispids7jcgrgcmanf9jqgvk0vaflrvgalz587jwr2zf21k8"; platforms = lib.platforms.linux; };
arangodb_3_4 = common { version = "3.4.7"; sha256 = "1wr2xvi5lnl6f2ryyxdwn4wnfiaz0rrf58ja1k19m7b6w3264iim"; platforms = lib.platforms.linux; };
arangodb_3_5 = common { version = "3.5.0-rc.7"; sha256 = "1sdmbmyml9d3ia3706bv5901qqmh4sxk7js5b9hyfjqpcib10d1k"; platforms = [ "x86_64-linux" ]; }; # "aarch64-linux" fails with "fatal error: x86intrin.h: No such file or directory"
arangodb_3_2 = common { version = "3.2.18"; sha256 = "05mfrx1g6dh1bzzqs23nvk0rg3v8y2dhdam4lym55pzlhqa7lf0x"; };
arangodb_3_3 = common { version = "3.3.23.1"; sha256 = "0bnbiispids7jcgrgcmanf9jqgvk0vaflrvgalz587jwr2zf21k8"; };
arangodb_3_4 = common { version = "3.4.7"; sha256 = "1wr2xvi5lnl6f2ryyxdwn4wnfiaz0rrf58ja1k19m7b6w3264iim"; };
arangodb_3_5 = common { version = "3.5.0-rc.7"; sha256 = "1sdmbmyml9d3ia3706bv5901qqmh4sxk7js5b9hyfjqpcib10d1k"; };
}