-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Foundry is a portable, modular toolkit for Ethereum application development written in Rust. An `update-svm-lists.sh` script is included as a helper for myself / other maintainers to periodically update the solidity binary lists required by the `svm-rs` crate. Co-authored-by: mitchmindtree <[email protected]>
- Loading branch information
1 parent
4aa7d2d
commit 60652f2
Showing
5 changed files
with
2,276 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
darwin, | ||
fetchFromGitHub, | ||
libusb1, | ||
nix-update-script, | ||
pkg-config, | ||
rustPlatform, | ||
solc, | ||
versionCheckHook, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "foundry"; | ||
version = "0.3.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "foundry-rs"; | ||
repo = "foundry"; | ||
tag = "v${version}"; | ||
hash = "sha256-SdxcNbe8/dNZ4JcxKksWmDBAvQorpC8ePvQgnyeKgxU="; | ||
}; | ||
|
||
cargoHash = "sha256-PQbp9jZZB/dsyKAlckZwl8xOpXks3anqUm+Ld7IhMFI="; | ||
|
||
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ darwin.DarwinTools ]; | ||
|
||
buildInputs = [ solc ] ++ lib.optionals stdenv.isDarwin [ libusb1 ]; | ||
|
||
# Tests are run upstream, and many perform I/O | ||
# incompatible with the nix build sandbox. | ||
doCheck = false; | ||
|
||
nativeInstallCheckInputs = [ | ||
versionCheckHook | ||
]; | ||
versionCheckProgramArg = [ "--version" ]; | ||
doInstallCheck = true; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
env = { | ||
SVM_RELEASES_LIST_JSON = | ||
if stdenv.isDarwin then | ||
# Confusingly, these are universal binaries, not amd64. | ||
# See: https://github.com/ethereum/solidity/issues/12291#issuecomment-1974771433 | ||
"${./svm-lists/macosx-amd64.json}" | ||
else | ||
"${./svm-lists/linux-amd64.json}"; | ||
}; | ||
|
||
meta = { | ||
homepage = "https://github.com/foundry-rs/foundry"; | ||
description = "Portable, modular toolkit for Ethereum application development written in Rust."; | ||
changelog = "https://github.com/foundry-rs/foundry/blob/v${version}/CHANGELOG.md"; | ||
license = with lib.licenses; [ | ||
asl20 | ||
mit | ||
]; | ||
maintainers = with lib.maintainers; [ | ||
mitchmindtree | ||
msanft | ||
]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
} |
Oops, something went wrong.