Skip to content

Commit feeaa87

Browse files
committed
feat(pkgs/foundry): Implement package for foundry v1.0.0
1 parent 12c4244 commit feeaa87

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

packages/all-packages.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
cardano-cli
2424
pkgs-with-rust-overlay
2525
rust-bin-2024-08-01
26+
unstable-pkgs
2627
;
2728
python3Packages = pkgs.python3Packages;
2829

@@ -119,6 +120,8 @@
119120
graphql = callPackage ./graphql/default.nix { inherit cardano-cli cardano-node; };
120121
cardano = callPackage ./cardano/default.nix { inherit cardano-cli cardano-node graphql; };
121122

123+
foundry = callPackage ./foundry/default.nix { inherit unstable-pkgs; };
124+
122125
polkadot-generic = callPackage ./polkadot/default.nix {
123126
craneLib = craneLib-stable;
124127
inherit (darwin) libiconv;
@@ -189,6 +192,9 @@
189192
{
190193
legacyPackages.metacraft-labs =
191194
rec {
195+
196+
inherit foundry;
197+
192198
gaiad = callPackage ./gaiad { };
193199
cosmos-theta-testnet = callPackage ./cosmos-theta-testnet { inherit gaiad; };
194200
blst = callPackage ./blst { };

packages/default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
in
2424
pkgs.extend rust-overlay;
2525

26+
unstable-pkgs = inputs.nixpkgs-unstable.legacyPackages.${system};
27+
2628
rust-stable = pkgs-with-rust-overlay.rust-bin.stable.latest.default.override {
2729
extensions = [ "rust-src" ];
2830
targets = [
@@ -90,6 +92,7 @@
9092
craneLib-stable
9193
craneLib-nightly
9294
pkgs-with-rust-overlay
95+
unstable-pkgs
9396
;
9497

9598
rust-bin-2024-08-01 = inputs.rust-overlay-2024-08-01.lib.mkRustBin { } pkgs;

packages/foundry/default.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
unstable-pkgs,
3+
...
4+
}:
5+
with unstable-pkgs;
6+
rustPlatform.buildRustPackage rec {
7+
pname = "foundry";
8+
version = "1.0.0";
9+
10+
src = fetchFromGitHub {
11+
owner = "foundry-rs";
12+
repo = pname;
13+
rev = "v${version}";
14+
hash = "sha256-YTsneUj5OPw7EyKZMFLJJeAtZoD0je1DdmfMjVju4L8=";
15+
};
16+
17+
solc-bin-json = fetchurl {
18+
url = "https://raw.githubusercontent.com/ethereum/solc-bin/f5f39aa9f399dbd24e2dcbccb9e277c573a49d1b/linux-amd64/list.json";
19+
hash = "sha256-uiVRa6ewZDd1W62Vp5GGruJDO+fH8G8abVkz3XZZ/u8=";
20+
};
21+
22+
cargoLock = {
23+
lockFile = "${src}/Cargo.lock";
24+
};
25+
26+
doCheck = false;
27+
28+
SVM_RELEASES_LIST_JSON = "${solc-bin-json}";
29+
30+
meta = {
31+
description = "Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.";
32+
homepage = "https://github.com/foundry-rs/foundry";
33+
license = [
34+
lib.licenses.mit
35+
lib.licenses.asl20
36+
];
37+
maintainers = [ ];
38+
};
39+
}

0 commit comments

Comments
 (0)