summaryrefslogtreecommitdiffstats
path: root/pkgs/servers
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2019-03-01 08:21:02 +0000
committervolth <volth@volth.com>2019-08-06 11:48:34 +0000
commit048a0acb892e406a10eee516f3f020ba027a0195 (patch)
treed97799872c1c148bf74df78aca81fd8e3ec69f6e /pkgs/servers
parent06996d382e2175429ee895bfd83675d3d4517991 (diff)
arangodb: 3.3.19 -> 3.2.18, 3.3.22, 3.4.3, 3.5.0-rc.7
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/nosql/arangodb/default.nix93
1 files changed, 58 insertions, 35 deletions
diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix
index 12684eab551a..5db737dbebae 100644
--- a/pkgs/servers/nosql/arangodb/default.nix
+++ b/pkgs/servers/nosql/arangodb/default.nix
@@ -1,39 +1,62 @@
-{ stdenv, fetchFromGitHub
-, openssl, zlib, readline, cmake, python }:
+{ stdenv, lib, fetchFromGitHub, openssl, zlib, cmake, python2, perl, snappy, lzo, which }:
let
-in stdenv.mkDerivation rec {
- version = "3.3.19";
- name = "arangodb-${version}";
-
- src = fetchFromGitHub {
- repo = "arangodb";
- owner = "arangodb";
- rev = "v${version}";
- sha256 = "1qg4lqnn5x0xsmkq41mjj301mfh76r8ys1rkzhinxlq30jld3155";
- };
-
- buildInputs = [
- openssl zlib readline python
- ];
-
- nativeBuildInputs = [ cmake ];
-
- postPatch = ''
- sed -ie 's!/bin/echo!echo!' 3rdParty/V8/v*/gypfiles/*.gypi
- '';
-
- configureFlagsArray = [ "--with-openssl-lib=${openssl.out}/lib" ];
-
- NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
-
- enableParallelBuilding = true;
-
- meta = with stdenv.lib; {
- homepage = https://github.com/arangodb/arangodb;
- description = "A native multi-model database with flexible data models for documents, graphs, and key-values";
- license = licenses.asl20;
- platforms = platforms.linux;
- maintainers = [ maintainers.flosse ];
+ common = { version, sha256, platforms }: stdenv.mkDerivation {
+ 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";
+ NIX_CFLAGS_COMPILE = lib.optionals (lib.versionAtLeast version "3.5") [ "-Wno-error" ];
+ 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 = [
+ # do not set GCC's -march=xxx based on builder's /proc/cpuifo
+ # `stdenv.hostPlatform.platform.gcc.arch` goes to -march= the usual way
+ "-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"
+ }"
+ ];
+
+ enableParallelBuilding = true;
+
+ meta = with lib; {
+ 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;
+ 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"
}