Skip to content

Commit

Permalink
Update forge std, git submodule command & nix flake for solidity comp…
Browse files Browse the repository at this point in the history
…iler (#1368)

* include solc_0_8_19 in nix flake

* use latest forge-std

* fix git:submodule:sync command
  • Loading branch information
hellwolf authored Apr 21, 2023
1 parent b2711c3 commit 932e2e6
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.3.0
39 changes: 38 additions & 1 deletion flake.lock

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

29 changes: 21 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,34 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
foundry.url = "github:shazow/foundry.nix/monthly";
foundry.inputs.nixpkgs.follows = "nixpkgs";
foundry = {
url = "github:shazow/foundry.nix/monthly";
inputs.nixpkgs.follows = "nixpkgs";
};
solc = {
url = "github:hellwolf/solc.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, foundry } :
outputs = { self, nixpkgs, flake-utils, foundry, solc } :
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs {
inherit system;
overlays = [
foundry.overlay
solc.overlay
];
};
# minimem development shell
minimumEVMDevInputs = with pkgs; [
# for nodejs ecosystem
yarn
nodejs-16_x
nodejs-18_x
# for solidity development
foundry.defaultPackage.${system}
foundry-bin
solc_0_8_19
];
# additional tooling for whitehat hackers
whitehatInputs = with pkgs; [
Expand Down Expand Up @@ -77,8 +90,8 @@
};
devShells.full = with pkgs; mkShell {
buildInputs = minimumEVMDevInputs
++ whitehatInputs
++ specInputs;
++ whitehatInputs
++ specInputs;
};
devShells.ci-spec-ghc925 = ci-spec "ghc925";
devShells.ci-spec-ghc944 = ci-spec "ghc944";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prepare": "yarn git:submodule:init",
"git:submodule:init": "git submodule update --init --recursive",
"git:submodule:update": "git submodule update --recursive",
"git:submodule:sync": "git submodule update --remote --recursive;git submodule sync",
"git:submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive",
"git:submodule:deinit": "git submodule deinit --all --force",
"lint": "run-s lint:*",
"lint:shellcheck": "tasks/shellcheck-all-tasks.sh",
Expand Down

0 comments on commit 932e2e6

Please sign in to comment.