2 # gcc 11.2 suggested on 3.10.5.2.
3 # gcc 11.3.0 unsupported yet, investigate gcc support when upgrading
4 # See https://github.com/arangodb/arangodb/issues/17454
17 , targetArchitecture ? null
18 , asmOptimizations ? gcc10Stdenv.hostPlatform.isx86
22 defaultTargetArchitecture =
23 if gcc10Stdenv.hostPlatform.isx86
28 if targetArchitecture == null
29 then defaultTargetArchitecture
30 else targetArchitecture;
33 gcc10Stdenv.mkDerivation rec {
37 src = fetchFromGitHub {
41 sha256 = "sha256-64iTxhG8qKTSrTlH/BWDJNnLf8VnaCteCKfQ9D2lGDQ=";
42 fetchSubmodules = true;
45 nativeBuildInputs = [ cmake git perl python3 which ];
47 buildInputs = [ openssl zlib snappy lzo ];
49 # prevent failing with "cmake-3.13.4/nix-support/setup-hook: line 10: ./3rdParty/rocksdb/RocksDBConfig.cmake.in: No such file or directory"
51 env.NIX_CFLAGS_COMPILE = "-Wno-error";
54 sed -ie 's!/bin/echo!echo!' 3rdParty/V8/gypfiles/*.gypi
56 # with nixpkgs, it has no sense to check for a version update
57 substituteInPlace js/client/client.js --replace "require('@arangodb').checkAvailableVersions();" ""
58 substituteInPlace js/server/server.js --replace "require('@arangodb').checkAvailableVersions();" ""
65 cmakeBuildType = "RelWithDebInfo";
68 "-DUSE_MAINTAINER_MODE=OFF"
69 "-DUSE_GOOGLE_TESTS=OFF"
71 # avoid reading /proc/cpuinfo for feature detection
72 "-DTARGET_ARCHITECTURE=${targetArch}"
73 ] ++ lib.optionals asmOptimizations [
74 "-DASM_OPTIMIZATIONS=ON"
75 "-DHAVE_SSE42=${if gcc10Stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
79 homepage = "https://www.arangodb.com";
80 description = "A native multi-model database with flexible data models for documents, graphs, and key-values";
81 license = licenses.asl20;
82 platforms = [ "x86_64-linux" ];
83 maintainers = with maintainers; [ flosse jsoo1 ];