From a9e2b957fb25fe60e7bddca839f7da5af1e33d5b Mon Sep 17 00:00:00 2001 From: 0xgsvs <0xgsvs@gmail.com> Date: Thu, 14 May 2026 21:17:11 +0530 Subject: [PATCH] surfpool: 1.2.1 -> 1.3.0 https://github.com/solana-foundation/surfpool/releases/tag/v1.3.0 --- pkgs/by-name/su/surfpool/package.nix | 35 +++++----------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/pkgs/by-name/su/surfpool/package.nix b/pkgs/by-name/su/surfpool/package.nix index 56a34be234e4..196a4a8ff2f1 100644 --- a/pkgs/by-name/su/surfpool/package.nix +++ b/pkgs/by-name/su/surfpool/package.nix @@ -2,7 +2,7 @@ lib, rustPlatform, fetchFromGitHub, - fetchzip, + fetchurl, pkg-config, versionCheckHook, openssl, @@ -10,49 +10,26 @@ let studioUiVersion = "v0.1.0"; - studioUi = fetchzip { + studioUi = fetchurl { url = "https://github.com/solana-foundation/surfpool-web-ui/releases/download/${studioUiVersion}/studio-dist.zip"; - hash = "sha256-uZZpaAIg7f+ji5yonwNbAxbxi+4x7g5V4xKWUXNn1UI="; - stripRoot = false; + hash = "sha256-DeWm2FzZbdaHXaEFA8W/YIIcJx4Z+uFkrxuajTM9n1M="; }; in rustPlatform.buildRustPackage (finalAttrs: { pname = "surfpool-cli"; - version = "1.2.1"; + version = "1.3.0"; __structuredAttrs = true; src = fetchFromGitHub { owner = "solana-foundation"; repo = "surfpool"; tag = "v${finalAttrs.version}"; - hash = "sha256-oO6K8OJXj2HQOExhT/6auCjfCOpUrSkHJJncztCjRWU="; + hash = "sha256-Yy30n/dZgDkXmWZM5KmoK+CJNCPvNcKvk5N+fusELJ4="; fetchSubmodules = true; }; - cargoHash = "sha256-MLWXYVVmJXxUY6LRsi8LiVJbVAAvcA3wbT8eiz4pAaE="; - - postPatch = '' - # instead of downloading the surfpool-web-ui at build time, we fetch it beforehand and use it - # https://github.com/solana-foundation/surfpool/pull/628 - substituteInPlace crates/studio/build.rs \ - --replace-fail \ - 'let url = match env::var("STUDIO_UI_VERSION") {' \ - 'if let Ok(dist_path) = env::var("STUDIO_UI_DIST") { - let src = std::path::Path::new(&dist_path); - fn copy_dir(s: &std::path::Path, d: &std::path::Path) { - std::fs::create_dir_all(d).unwrap(); - for e in std::fs::read_dir(s).unwrap() { - let e = e.unwrap(); - if e.file_type().unwrap().is_dir() { copy_dir(&e.path(), &d.join(e.file_name())); } - else { std::fs::copy(e.path(), d.join(e.file_name())).unwrap(); } - } - } - copy_dir(src, &asset_dir); - return; - } - let url = match env::var("STUDIO_UI_VERSION") {' - ''; + cargoHash = "sha256-GGuonsdJU/E6A5BM6qcx+f6yZEzvbrmTLBe2lNBdfDI="; env = { RUSTFLAGS = "-Aunused";