solana-cli: remove Cargo.lock (#389236)

This commit is contained in:
Yt
2025-03-12 20:45:05 -04:00
committed by GitHub
3 changed files with 74 additions and 9453 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,53 @@
diff --git a/Cargo.lock b/Cargo.lock
index 0194c34ed2..0d58655f70 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1419,14 +1419,14 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.5"
-source = "git+https://github.com/anza-xyz/crossbeam?rev=fd279d707025f0e60951e429bf778b4813d1b6bf#fd279d707025f0e60951e429bf778b4813d1b6bf"
+version = "0.9.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa"
dependencies = [
+ "autocfg",
"cfg-if 1.0.0",
"crossbeam-utils",
- "lazy_static",
- "memoffset 0.6.4",
- "scopeguard",
+ "memoffset 0.9.0",
]
[[package]]
@@ -3118,15 +3118,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "memoffset"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9"
-dependencies = [
- "autocfg",
-]
-
[[package]]
name = "memoffset"
version = "0.7.1"
diff --git a/Cargo.toml b/Cargo.toml
index 2ff2094d67..a3ace4459a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -435,7 +435,7 @@ zstd = "0.11.2"
[patch.crates-io]
# for details, see https://github.com/anza-xyz/crossbeam/commit/fd279d707025f0e60951e429bf778b4813d1b6bf
-crossbeam-epoch = { git = "https://github.com/anza-xyz/crossbeam", rev = "fd279d707025f0e60951e429bf778b4813d1b6bf" }
+# crossbeam-epoch = { git = "https://github.com/anza-xyz/crossbeam", rev = "fd279d707025f0e60951e429bf778b4813d1b6bf" }
# We include the following crates as our dependencies above from crates.io:
#
+21 -10
View File
@@ -12,6 +12,7 @@
pkg-config,
openssl,
nix-update-script,
versionCheckHook,
# Taken from https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L84
solanaPkgs ?
[
@@ -57,20 +58,24 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "solana-labs";
repo = "solana";
rev = "v${version}";
tag = "v${version}";
inherit hash;
};
cargoLock = {
lockFile = ./Cargo.lock;
# The `crossbeam-epoch@0.9.5` crate used by the solana crates is their own fork,
# which exists due to performance-related reasons.
# The `solana-cli` build fails because this forked `crossbeam-epoch` crate contains a
# symlink that points outside of the crate into the root of the repository.
# This characteristic already existed in upstream `crossbeam-epoch@0.9.5`.
#
# As `buildRustPackage` vendors the dependencies of the `solana-cli` during the `buildPhase`,
# which occurs after the `patchPhase`, this `crossbeam-epoch` is not patchable in this build.
# The remaining solution is to make use of `cargoPatches` to remove the fork and bump to `crossbeam-epoch@0.9.16`,
# which is the first version that removed the `build.rs`.
cargoPatches = [ ./crossbeam-epoch.patch ];
outputHashes = {
"crossbeam-epoch-0.9.5" = "sha256-Jf0RarsgJiXiZ+ddy0vp4jQ59J9m0k3sgXhWhCdhgws=";
"tokio-1.29.1" = "sha256-Z/kewMCqkPVTXdoBcSaFKG5GSQAdkdpj3mAzLLCjjGk=";
"aes-gcm-siv-0.10.3" = "sha256-N1ppxvew4B50JQWsC3xzP0X4jgyXZ5aOQ0oJMmArjW8=";
"curve25519-dalek-3.2.1" = "sha256-FuVNFuGCyHXqKqg+sn3hocZf1KMCI092Ohk7cvLPNjQ=";
};
};
cargoHash = "sha256-adzcLrOiUUYhz57gme/hEmD4E3kVcKCp0/jSoavZfjw=";
useFetchCargoVendor = true;
strictDeps = true;
cargoBuildFlags = builtins.map (n: "--bin=${n}") solanaPkgs;
@@ -102,6 +107,12 @@ rustPlatform.buildRustPackage rec {
Libsystem
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/solana";
versionCheckProgramArg = "--version";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd solana \
--bash <($out/bin/solana completion --shell bash) \