From 5bf19e9c5e97978c1c2ffe0572d875e9b5983181 Mon Sep 17 00:00:00 2001 From: kyehn Date: Wed, 10 Sep 2025 22:54:17 +0800 Subject: [PATCH 1/4] tarantool: 2.10.4 -> 3.5.0 Diff: https://github.com/tarantool/tarantool/compare/2.10.4...3.5.0 --- pkgs/by-name/ta/tarantool/package.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ta/tarantool/package.nix b/pkgs/by-name/ta/tarantool/package.nix index f61eeae0247d..52dbb70b3387 100644 --- a/pkgs/by-name/ta/tarantool/package.nix +++ b/pkgs/by-name/ta/tarantool/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + autoreconfHook, cmake, zlib, openssl, @@ -15,16 +16,24 @@ stdenv.mkDerivation rec { pname = "tarantool"; - version = "2.10.4"; + version = "3.5.0"; src = fetchFromGitHub { owner = "tarantool"; repo = "tarantool"; tag = version; - hash = "sha256-yCRU5IxC6gNS+O2KYtKWjFk35EHkBnnzWy5UnyuB9f4="; + hash = "sha256-NU+0R07Qrnew7+HeeJu6QnGfktEXFRxSZFwl48vjGZE="; fetchSubmodules = true; }; + postPatch = '' + cat <<'EOF' > third_party/luajit/test/cmake/GetLinuxDistro.cmake + macro(GetLinuxDistro output) + set(''${output} linux) + endmacro() + EOF + ''; + buildInputs = [ nghttp2 git @@ -37,7 +46,18 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ gbenchmark ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + autoreconfHook + cmake + ]; + + preAutoreconf = '' + pushd third_party/libunwind + ''; + + postAutoreconf = '' + popd + ''; cmakeBuildType = "RelWithDebInfo"; From 90c943be35ec0e71631115f7b63fbdb77a31a10e Mon Sep 17 00:00:00 2001 From: kyehn Date: Wed, 10 Sep 2025 22:54:48 +0800 Subject: [PATCH 2/4] tarantool: remove with lib --- pkgs/by-name/ta/tarantool/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ta/tarantool/package.nix b/pkgs/by-name/ta/tarantool/package.nix index 52dbb70b3387..33e5e3cd7386 100644 --- a/pkgs/by-name/ta/tarantool/package.nix +++ b/pkgs/by-name/ta/tarantool/package.nix @@ -66,11 +66,11 @@ stdenv.mkDerivation rec { "-DTARANTOOL_VERSION=${version}.builtByNix" # expects the commit hash as well ]; - meta = with lib; { + meta = { description = "In-memory computing platform consisting of a database and an application server"; homepage = "https://www.tarantool.io/"; - license = licenses.bsd2; + license = lib.licenses.bsd2; mainProgram = "tarantool"; - maintainers = with maintainers; [ dit7ya ]; + maintainers = with lib.maintainers; [ dit7ya ]; }; } From a866a39ac9c99a7725867f5374e38554b73546cc Mon Sep 17 00:00:00 2001 From: kyehn Date: Wed, 10 Sep 2025 22:55:40 +0800 Subject: [PATCH 3/4] tarantool: use finalAttrs --- pkgs/by-name/ta/tarantool/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ta/tarantool/package.nix b/pkgs/by-name/ta/tarantool/package.nix index 33e5e3cd7386..4bc82dcd46e8 100644 --- a/pkgs/by-name/ta/tarantool/package.nix +++ b/pkgs/by-name/ta/tarantool/package.nix @@ -14,14 +14,14 @@ nghttp2, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tarantool"; version = "3.5.0"; src = fetchFromGitHub { owner = "tarantool"; repo = "tarantool"; - tag = version; + tag = finalAttrs.version; hash = "sha256-NU+0R07Qrnew7+HeeJu6QnGfktEXFRxSZFwl48vjGZE="; fetchSubmodules = true; }; @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DENABLE_DIST=ON" - "-DTARANTOOL_VERSION=${version}.builtByNix" # expects the commit hash as well + "-DTARANTOOL_VERSION=${finalAttrs.version}.builtByNix" # expects the commit hash as well ]; meta = { @@ -73,4 +73,4 @@ stdenv.mkDerivation rec { mainProgram = "tarantool"; maintainers = with lib.maintainers; [ dit7ya ]; }; -} +}) From 365f7c1c17304f60a85ab41088e46b644f34bc10 Mon Sep 17 00:00:00 2001 From: kyehn Date: Wed, 10 Sep 2025 22:58:19 +0800 Subject: [PATCH 4/4] tarantool: add updateScript --- pkgs/by-name/ta/tarantool/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ta/tarantool/package.nix b/pkgs/by-name/ta/tarantool/package.nix index 4bc82dcd46e8..38b5771a3560 100644 --- a/pkgs/by-name/ta/tarantool/package.nix +++ b/pkgs/by-name/ta/tarantool/package.nix @@ -12,6 +12,7 @@ git, gbenchmark, nghttp2, + nix-update-script, }: stdenv.mkDerivation (finalAttrs: { @@ -66,6 +67,8 @@ stdenv.mkDerivation (finalAttrs: { "-DTARANTOOL_VERSION=${finalAttrs.version}.builtByNix" # expects the commit hash as well ]; + passthru.updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; }; + meta = { description = "In-memory computing platform consisting of a database and an application server"; homepage = "https://www.tarantool.io/";