2019-03-01 08:21:02 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, zlib, cmake, python2, perl, snappy, lzo, which }:
|
2015-04-30 15:48:57 +01:00
|
|
|
|
2016-11-09 11:07:13 +00:00
|
|
|
let
|
2019-08-06 21:58:07 +01:00
|
|
|
common = { version, sha256 }: stdenv.mkDerivation {
|
2019-03-01 08:21:02 +00:00
|
|
|
pname = "arangodb";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "arangodb";
|
|
|
|
owner = "arangodb";
|
|
|
|
rev = "v${version}";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake python2 perl which ];
|
|
|
|
buildInputs = [ openssl zlib snappy lzo ];
|
|
|
|
|
|
|
|
# prevent failing with "cmake-3.13.4/nix-support/setup-hook: line 10: ./3rdParty/rocksdb/RocksDBConfig.cmake.in: No such file or directory"
|
|
|
|
dontFixCmake = lib.versionAtLeast version "3.5";
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionAtLeast version "3.5") "-Wno-error";
|
2019-03-01 08:21:02 +00:00
|
|
|
preConfigure = lib.optionalString (lib.versionAtLeast version "3.5") "patchShebangs utils";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -ie 's!/bin/echo!echo!' 3rdParty/V8/v*/gypfiles/*.gypi
|
|
|
|
|
|
|
|
# with nixpkgs, it has no sense to check for a version update
|
|
|
|
substituteInPlace js/client/client.js --replace "require('@arangodb').checkAvailableVersions();" ""
|
|
|
|
substituteInPlace js/server/server.js --replace "require('@arangodb').checkAvailableVersions();" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2019-08-06 21:58:07 +01:00
|
|
|
# do not set GCC's -march=xxx based on builder's /proc/cpuinfo
|
2019-03-01 08:21:02 +00:00
|
|
|
"-DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF"
|
|
|
|
# also avoid using builder's /proc/cpuinfo
|
2020-08-05 03:32:41 +01:00
|
|
|
"-DHAVE_SSE42=${if stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
|
|
|
|
"-DASM_OPTIMIZATIONS=${if stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
|
|
|
|
];
|
2019-03-01 08:21:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.arangodb.com";
|
2019-03-01 08:21:02 +00:00
|
|
|
description = "A native multi-model database with flexible data models for documents, graphs, and key-values";
|
|
|
|
license = licenses.asl20;
|
2019-08-06 21:58:07 +01:00
|
|
|
platforms = platforms.linux;
|
2019-03-01 08:21:02 +00:00
|
|
|
maintainers = [ maintainers.flosse ];
|
|
|
|
};
|
2015-04-30 15:48:57 +01:00
|
|
|
};
|
2019-03-01 08:21:02 +00:00
|
|
|
in {
|
2019-11-02 17:45:28 +00:00
|
|
|
arangodb_3_3 = common {
|
|
|
|
version = "3.3.24";
|
|
|
|
sha256 = "18175789j4y586qvpcsaqxmw7d6vc3s29qm1fja5c7wzimx6ilyp";
|
|
|
|
};
|
|
|
|
arangodb_3_4 = common {
|
|
|
|
version = "3.4.8";
|
|
|
|
sha256 = "0vm94lf1i1vvs04vy68bkkv9q43rsaf1y3kfs6s3jcrs3ay0h0jn";
|
|
|
|
};
|
|
|
|
arangodb_3_5 = common {
|
|
|
|
version = "3.5.1";
|
|
|
|
sha256 = "1jw3j7vaq3xgkxiqg0bafn4b2169jq7f3y0l7mrpnrpijn77rkrv";
|
|
|
|
};
|
2015-04-30 15:48:57 +01:00
|
|
|
}
|