Skip to content

Commit c04d9a9

Browse files
authored
svm: Disable NixOS patching after 0.8.28 (#159)
Since 0.8.29, the builds are fully static again. The patching for nixos is not only unnecessary, but triggers errors. This fixes it. See https://github.com/ethereum/solidity/releases/tag/v0.8.29 > Linux release builds are fully static again and no longer depend on `glibc`.
1 parent 4c1b82b commit c04d9a9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/svm-rs/src/install.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const REQUEST_TIMEOUT: Duration = Duration::from_secs(600);
2222
/// Version beyond which solc binaries are not fully static, hence need to be patched for NixOS.
2323
const NIXOS_MIN_PATCH_VERSION: Version = Version::new(0, 7, 6);
2424

25+
/// Version beyond which solc binaries are fully static again, hence no patching is needed for NixOS.
26+
/// See <https://github.com/ethereum/solidity/releases/tag/v0.8.29>
27+
const NIXOS_MAX_PATCH_VERSION: Version = Version::new(0, 8, 28);
28+
2529
/// Blocking version of [`install`]
2630
#[cfg(feature = "blocking")]
2731
pub fn blocking_install(version: &Version) -> Result<PathBuf, SvmError> {
@@ -219,7 +223,10 @@ impl Installer<'_> {
219223
f.set_permissions(Permissions::from_mode(0o755))?;
220224
f.write_all(self.binbytes)?;
221225

222-
if platform::is_nixos() && *self.version >= NIXOS_MIN_PATCH_VERSION {
226+
if platform::is_nixos()
227+
&& *self.version >= NIXOS_MIN_PATCH_VERSION
228+
&& *self.version <= NIXOS_MAX_PATCH_VERSION
229+
{
223230
patch_for_nixos(&temp_path)?;
224231
}
225232

0 commit comments

Comments
 (0)