Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anchor: fix build; run nixfmt #344170

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions pkgs/by-name/an/anchor/0001-update-time-rs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
From ff4dfb52767695c066b4ad027983c0d4958094b3 Mon Sep 17 00:00:00 2001
From: wxt <[email protected]>
Date: Tue, 24 Sep 2024 17:20:19 +0800
Subject: [PATCH] update time-rs

---
Cargo.lock | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index d588e86c..f09caad8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1432,9 +1432,12 @@ dependencies = [

[[package]]
name = "deranged"
-version = "0.3.8"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]

[[package]]
name = "derivation-path"
@@ -2629,6 +2632,12 @@ dependencies = [
"num-traits",
]

+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-derive"
version = "0.3.3"
@@ -3014,6 +3023,12 @@ dependencies = [
"rand 0.8.5",
]

+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@@ -5276,12 +5291,14 @@ dependencies = [

[[package]]
name = "time"
-version = "0.3.29"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -5295,10 +5312,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"

[[package]]
name = "time-macros"
-version = "0.2.15"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]

--
2.46.0

30 changes: 24 additions & 6 deletions pkgs/by-name/an/anchor/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions pkgs/by-name/an/anchor/package.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, darwin
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
darwin,
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -17,6 +18,10 @@ rustPlatform.buildRustPackage rec {
fetchSubmodules = true;
};

cargoPatches = [
./0001-update-time-rs.patch
];

cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
Expand All @@ -36,7 +41,6 @@ rustPlatform.buildRustPackage rec {
"--skip=tests::test_get_anchor_version_from_commit"
];


meta = with lib; {
description = "Solana Sealevel Framework";
homepage = "https://github.com/coral-xyz/anchor";
Expand Down