Skip to content
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
22 changes: 11 additions & 11 deletions flake.lock

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

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
description = "Solana development setup with Nix.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/8b27c1239e5c421a2bbc2c65d52e4a6fbf2ff296";
nixpkgs.url = "github:nixos/nixpkgs/11cb3517b3af6af300dd6c055aeda73c9bf52c48";
flake-parts.url = "github:hercules-ci/flake-parts/f4330d22f1c5d2ba72d3d22df5597d123fdb60a9";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
rust-overlay = {
url = "github:oxalica/rust-overlay/bd32e88bef6da0e021a42fb4120a8df2150e9b8c";
url = "github:oxalica/rust-overlay/f46d294b87ebb9f7124f1ce13aa2a5f5acc0f3eb";
inputs.nixpkgs.follows = "nixpkgs";
};
crane.url = "github:ipetkov/crane";
Expand Down
10 changes: 5 additions & 5 deletions solana-cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
udev,
protobuf,
libcxx,
rocksdb_8_11,
rocksdb,
pkg-config,
makeWrapper,
solana-platform-tools,
Expand Down Expand Up @@ -44,8 +44,8 @@ let
version = solana-source.version;
src = solana-source.src;

# Use Rust 1.84.1 as required by Agave
rust = rust-bin.stable."1.84.1".default;
# Use Rust 1.86.0 as required by Agave
rust = rust-bin.stable."1.86.0".default;
rustPlatform = makeRustPlatform {
cargo = rust;
rustc = rust;
Expand Down Expand Up @@ -98,8 +98,8 @@ let
NIX_OUTPATH_USED_AS_RANDOM_SEED = "aaaaaaaaaa";

# Used by build.rs in the rocksdb-sys crate
ROCKSDB_LIB_DIR = "${rocksdb_8_11}/lib";
ROCKSDB_INCLUDE_DIR = "${rocksdb_8_11}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";

# For darwin systems
CPPFLAGS = lib.optionals stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1";
Expand Down
14 changes: 11 additions & 3 deletions solana-platform-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
lib,
libclang,
libedit,
openssl,
python310,
solana-source,
udev,
xz,
zlib,
system ? builtins.currentSystem,
version ? "1.45",
version ? "1.48",
}:
let
systemMapping = {
Expand All @@ -24,6 +25,13 @@ let
};

versionMapping = {
"1.48" = {
x86_64-linux = "sha256-vHeOPs7B7WptUJ/mVvyt7ue+MqfqAsbwAHM+xlN/tgQ=";
aarch64-linux = "sha256-i3I9pwa+DyMJINFr+IucwytzEHdiRZU6r7xWHzppuR4=";
x86_64-darwin = "sha256-bXV4S8JeM4RJ7D9u+ruwtNFJ9aq01cFw80sprxB+Xng=";
aarch64-darwin = "sha256-ViXRoGlfn0aduNaZgsiXTcSIZO560DmFF5+kh3kYNIA=";
x86_64-windows = "sha256-hEVs9TPLX2YY2SBwt8qE8b700yznC71NHszz/zXdpZQ=";
};
"1.45" = {
x86_64-linux = "sha256-QGm7mOd3UnssYhPt8RSSRiS5LiddkXuDtWuakpak0Y0=";
aarch64-linux = "sha256-UzOekFBdjtHJzzytmkQETd6Mrb+cdAsbZBA0kzc75Ws=";
Expand Down Expand Up @@ -68,7 +76,7 @@ stdenv.mkDerivation rec {
libclang.lib
xz
python310
] ++ lib.optionals stdenv.isLinux [ udev ];
] ++ lib.optionals stdenv.isLinux [ openssl udev ];

installPhase = ''
platformtools=$out/bin/platform-tools-sdk/sbf/dependencies/platform-tools
Expand All @@ -91,7 +99,7 @@ stdenv.mkDerivation rec {

# A bit ugly, but liblldb.so uses libedit.so.2 and nix provides libedit.so
postFixup = lib.optionals stdenv.isLinux ''
patchelf --replace-needed libedit.so.2 libedit.so $out/bin/platform-tools-sdk/sbf/dependencies/platform-tools/llvm/lib/liblldb.so.18.1.7-rust-dev
patchelf --replace-needed libedit.so.2 libedit.so $out/bin/platform-tools-sdk/sbf/dependencies/platform-tools/llvm/lib/liblldb.so.19.1.7-rust-dev
'';

# We need to preserve metadata in .rlib, which might get stripped on macOS. See https://github.com/NixOS/nixpkgs/issues/218712
Expand Down
4 changes: 2 additions & 2 deletions solana-source.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub }:
let
version = "2.2.3";
sha256 = "sha256-nRCamrwzoPX0cAEcP6p0t0t9Q41RjM6okupOPkJH5lQ=";
version = "2.3.7";
sha256 = "sha256-PZtnPBQbQwr5Ezogzv5ujALTaMcFAIZhPhaBQWt1jp8=";
in
{
inherit version;
Expand Down
Loading