nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 cmake,
7 zlib,
8 openssl,
9 c-ares,
10 readline,
11 icu,
12 git,
13 gbenchmark,
14 nghttp2,
15 nix-update-script,
16}:
17
18stdenv.mkDerivation (finalAttrs: {
19 pname = "tarantool";
20 version = "3.6.0";
21
22 src = fetchFromGitHub {
23 owner = "tarantool";
24 repo = "tarantool";
25 tag = finalAttrs.version;
26 hash = "sha256-fkAjzAS7LV+bME8FeImg1OXNfNhXTH6qb53TzHz4SFY=";
27 fetchSubmodules = true;
28 };
29
30 postPatch = ''
31 cat <<'EOF' > third_party/luajit/test/cmake/GetLinuxDistro.cmake
32 macro(GetLinuxDistro output)
33 set(''${output} linux)
34 endmacro()
35 EOF
36 '';
37
38 buildInputs = [
39 nghttp2
40 git
41 readline
42 icu
43 zlib
44 openssl
45 c-ares
46 ];
47
48 nativeCheckInputs = [ gbenchmark ];
49
50 nativeBuildInputs = [
51 autoreconfHook
52 cmake
53 ];
54
55 preAutoreconf = ''
56 pushd third_party/libunwind
57 '';
58
59 postAutoreconf = ''
60 popd
61 '';
62
63 cmakeBuildType = "RelWithDebInfo";
64
65 cmakeFlags = [
66 "-DENABLE_DIST=ON"
67 "-DTARANTOOL_VERSION=${finalAttrs.version}.builtByNix" # expects the commit hash as well
68 ];
69
70 passthru.updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; };
71
72 meta = {
73 description = "In-memory computing platform consisting of a database and an application server";
74 homepage = "https://www.tarantool.io/";
75 license = lib.licenses.bsd2;
76 mainProgram = "tarantool";
77 maintainers = with lib.maintainers; [ dit7ya ];
78 };
79})