From b7ca9dc149bd90728891695d6365a59ce1a5d8ab Mon Sep 17 00:00:00 2001 From: Sirio Balmelli Date: Tue, 20 Aug 2024 21:27:39 +0200 Subject: [PATCH] surrealdb: fix build Patches build breakage on rust 1.80.1: error[E0282]: type annotations needed for `Box<_>` Upstream PR to the 1.x branch: https://github.com/surrealdb/surrealdb/pull/4565 Signed-off-by: Sirio Balmelli --- pkgs/by-name/su/surrealdb/package.nix | 8 ++++++-- pkgs/by-name/su/surrealdb/time.patch | 28 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 pkgs/by-name/su/surrealdb/time.patch diff --git a/pkgs/by-name/su/surrealdb/package.nix b/pkgs/by-name/su/surrealdb/package.nix index 4e69f2d1e87f..31623b5f16ef 100644 --- a/pkgs/by-name/su/surrealdb/package.nix +++ b/pkgs/by-name/su/surrealdb/package.nix @@ -25,7 +25,11 @@ rustPlatform.buildRustPackage rec { hash = "sha256-KtR+qU2Xys4NkEARZBbO8mTPa7EI9JplWvXdtuLt2vE="; }; - cargoHash = "sha256-b0KmL6RQevO7oLPZCgUc4EUkgv99DbMFD/RkE/fwAHw="; + patches = [ + ./time.patch # TODO: remove when https://github.com/surrealdb/surrealdb/pull/4565 merged + ]; + + cargoHash = "sha256-5qIIPdE6HYov5EIR4do+pMeZ1Lo3at39aKOP9scfMy8="; # error: linker `aarch64-linux-gnu-gcc` not found postPatch = '' @@ -69,6 +73,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://surrealdb.com/"; mainProgram = "surreal"; license = licenses.bsl11; - maintainers = with maintainers; [ sikmir happysalada ]; + maintainers = with maintainers; [ sikmir happysalada siriobalmelli ]; }; } diff --git a/pkgs/by-name/su/surrealdb/time.patch b/pkgs/by-name/su/surrealdb/time.patch new file mode 100644 index 000000000000..ef0ecfe698c4 --- /dev/null +++ b/pkgs/by-name/su/surrealdb/time.patch @@ -0,0 +1,28 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 64b3955f..b4598827 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -6478,9 +6478,9 @@ dependencies = [ + + [[package]] + name = "time" +-version = "0.3.34" ++version = "0.3.36" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" ++checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" + dependencies = [ + "deranged", + "itoa", +@@ -6499,9 +6499,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + + [[package]] + name = "time-macros" +-version = "0.2.17" ++version = "0.2.18" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" ++checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" + dependencies = [ + "num-conv", + "time-core",