Loading pkgs/by-name/so/solana-cli/crossbeam-epoch.patchdeleted 100644 → 0 +0 −53 Original line number Diff line number Diff line 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: # pkgs/by-name/so/solana-cli/package.nix +19 −28 Original line number Diff line number Diff line Loading @@ -5,28 +5,28 @@ rustPlatform, udev, protobuf, rocksdb_8_3, installShellFiles, pkg-config, openssl, nix-update-script, versionCheckHook, clang, libclang, rocksdb, # Taken from https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L84 solanaPkgs ? [ "cargo-build-bpf" "cargo-test-bpf" "cargo-build-sbf" "cargo-test-sbf" "solana" "solana-bench-tps" "solana-faucet" "solana-gossip" "solana-install" "agave-install" "solana-keygen" "solana-ledger-tool" "agave-ledger-tool" "solana-log-analyzer" "solana-net-shaper" "solana-validator" "agave-validator" "solana-test-validator" ] ++ [ Loading @@ -36,37 +36,26 @@ ], }: let version = "1.18.26"; hash = "sha256-sJ0Zn5GMi64/S8zqomL/dYRVW8SOQWsP+bpcdatJC0A="; rocksdb = rocksdb_8_3; version = "2.3.8"; hash = "sha256-CqkedeQk66VXG6lQAIVGd7ci0KPltf2Qq69iErBAQGo="; in rustPlatform.buildRustPackage rec { pname = "solana-cli"; inherit version; src = fetchFromGitHub { owner = "solana-labs"; repo = "solana"; owner = "anza-xyz"; repo = "agave"; tag = "v${version}"; inherit hash; }; # 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 ]; cargoHash = "sha256-adzcLrOiUUYhz57gme/hEmD4E3kVcKCp0/jSoavZfjw="; cargoHash = "sha256-J7gyR7K1hauV+VrzoNzRrooLuSkjk8U6A3aFn9O2yFY="; strictDeps = true; cargoBuildFlags = builtins.map (n: "--bin=${n}") solanaPkgs; RUSTFLAGS = "-Amismatched_lifetime_syntaxes -Adead_code"; LIBCLANG_PATH = "${libclang.lib}/lib"; # Even tho the tests work, a shit ton of them try to connect to a local RPC # or access internet in other ways, eventually failing due to Nix sandbox. Loading @@ -82,6 +71,8 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl clang libclang rustPlatform.bindgenHook ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ]; Loading @@ -97,10 +88,9 @@ rustPlatform.buildRustPackage rec { --bash <($out/bin/solana completion --shell bash) \ --fish <($out/bin/solana completion --shell fish) mkdir -p $out/bin/sdk/bpf cp -a ./sdk/bpf/* $out/bin/sdk/bpf/ mkdir -p $out/bin/sdk/sbf cp -a ./sdk/sbf/* $out/bin/sdk/sbf mkdir -p $out/bin/platform-tools-sdk cp -r ./platform-tools-sdk/sbf $out/bin/platform-tools-sdk mkdir -p $out/bin/deps find . -name libsolana_program.dylib -exec cp {} $out/bin/deps \; find . -name libsolana_program.rlib -exec cp {} $out/bin/deps \; Loading @@ -126,6 +116,7 @@ rustPlatform.buildRustPackage rec { netfox happysalada aikooo7 JacoMalan1 ]; platforms = platforms.unix; }; Loading Loading
pkgs/by-name/so/solana-cli/crossbeam-epoch.patchdeleted 100644 → 0 +0 −53 Original line number Diff line number Diff line 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: #
pkgs/by-name/so/solana-cli/package.nix +19 −28 Original line number Diff line number Diff line Loading @@ -5,28 +5,28 @@ rustPlatform, udev, protobuf, rocksdb_8_3, installShellFiles, pkg-config, openssl, nix-update-script, versionCheckHook, clang, libclang, rocksdb, # Taken from https://github.com/solana-labs/solana/blob/master/scripts/cargo-install-all.sh#L84 solanaPkgs ? [ "cargo-build-bpf" "cargo-test-bpf" "cargo-build-sbf" "cargo-test-sbf" "solana" "solana-bench-tps" "solana-faucet" "solana-gossip" "solana-install" "agave-install" "solana-keygen" "solana-ledger-tool" "agave-ledger-tool" "solana-log-analyzer" "solana-net-shaper" "solana-validator" "agave-validator" "solana-test-validator" ] ++ [ Loading @@ -36,37 +36,26 @@ ], }: let version = "1.18.26"; hash = "sha256-sJ0Zn5GMi64/S8zqomL/dYRVW8SOQWsP+bpcdatJC0A="; rocksdb = rocksdb_8_3; version = "2.3.8"; hash = "sha256-CqkedeQk66VXG6lQAIVGd7ci0KPltf2Qq69iErBAQGo="; in rustPlatform.buildRustPackage rec { pname = "solana-cli"; inherit version; src = fetchFromGitHub { owner = "solana-labs"; repo = "solana"; owner = "anza-xyz"; repo = "agave"; tag = "v${version}"; inherit hash; }; # 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 ]; cargoHash = "sha256-adzcLrOiUUYhz57gme/hEmD4E3kVcKCp0/jSoavZfjw="; cargoHash = "sha256-J7gyR7K1hauV+VrzoNzRrooLuSkjk8U6A3aFn9O2yFY="; strictDeps = true; cargoBuildFlags = builtins.map (n: "--bin=${n}") solanaPkgs; RUSTFLAGS = "-Amismatched_lifetime_syntaxes -Adead_code"; LIBCLANG_PATH = "${libclang.lib}/lib"; # Even tho the tests work, a shit ton of them try to connect to a local RPC # or access internet in other ways, eventually failing due to Nix sandbox. Loading @@ -82,6 +71,8 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl clang libclang rustPlatform.bindgenHook ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ]; Loading @@ -97,10 +88,9 @@ rustPlatform.buildRustPackage rec { --bash <($out/bin/solana completion --shell bash) \ --fish <($out/bin/solana completion --shell fish) mkdir -p $out/bin/sdk/bpf cp -a ./sdk/bpf/* $out/bin/sdk/bpf/ mkdir -p $out/bin/sdk/sbf cp -a ./sdk/sbf/* $out/bin/sdk/sbf mkdir -p $out/bin/platform-tools-sdk cp -r ./platform-tools-sdk/sbf $out/bin/platform-tools-sdk mkdir -p $out/bin/deps find . -name libsolana_program.dylib -exec cp {} $out/bin/deps \; find . -name libsolana_program.rlib -exec cp {} $out/bin/deps \; Loading @@ -126,6 +116,7 @@ rustPlatform.buildRustPackage rec { netfox happysalada aikooo7 JacoMalan1 ]; platforms = platforms.unix; }; Loading