Skip to content

Commit

Permalink
Merge pull request #929 from dapphub/rm-dapp2-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
d-xo authored Mar 31, 2022
2 parents b6000ee + 3d83cc8 commit c60f9ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions nix/solidity-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ in
, extract ? true
, deps ? []
, solc ? pkgs.solc
, test-hevm ? pkgs.dapp2.test-hevm
, hevm ? pkgs.hevm
, solcFlags ? ""
, flatten ? false
Expand All @@ -29,8 +28,7 @@ in
pkgs.stdenv.mkDerivation (rec {
inherit doCheck extract;
buildInputs = [ solc pkgs.jq ]
++ (pkgs.lib.optional (test-hevm != null) test-hevm)
++ pkgs.lib.optional flatten hevm;
++ pkgs.lib.optional (flatten || doCheck) hevm;
passthru = {
remappings = remappings deps;
libPaths = libPaths deps;
Expand Down
4 changes: 2 additions & 2 deletions nix/solidity-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ mapfile -t files < <(find "$dir/src" -name '*.sol')
json_file="out/dapp.sol.json"
(set -x; solc $REMAPPINGS "${opts[@]}" $solcFlags "${files[@]}" > "$json_file")

if [[ "$doCheck" == 1 ]] && command -v dapp2-test-hevm >/dev/null 2>&1; then
DAPP_OUT=out dapp2-test-hevm
if [[ "$doCheck" == 1 ]]; then
DAPP_OUT=out dapp test
fi

if [[ $flatten == 1 && ! $x =~ \.t(\.[a-z0-9]+)*\.sol$ ]]; then
Expand Down

0 comments on commit c60f9ec

Please sign in to comment.