Skip to content

Commit

Permalink
dapp/seth: fix --use and --nix-use
Browse files Browse the repository at this point in the history
According to the new CLI docs, by using --expr we're saying that the
installable (in our case `out`) is an attribute in the attribute set
that the expression evaluates to.

So it should always be there, and therefore callers don't need to add
it.
  • Loading branch information
asymmetric committed Mar 28, 2023
1 parent 79d6c11 commit 59afe3a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/dapp/libexec/dapp/dapp---nix-run
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ have() { command -v "$1" >/dev/null; }

expr="$1"; shift

nix run --impure --expr "with import $DAPPTOOLS {}; $expr" -- "$@"
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" out -- "$@"
2 changes: 1 addition & 1 deletion src/dapp/libexec/dapp/dapp---use
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ shift
[[ "$#" -gt 0 ]] || usage

if [[ -z "$bin" ]]; then
dapp --nix-run "dapp.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" out "$@"
dapp --nix-run "dapp.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" "$@"
else
set -e
SOLCBIN="$(realpath -e "${bin}")"
Expand Down
2 changes: 1 addition & 1 deletion src/seth/libexec/seth/seth---nix-run
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ have() { command -v "$1" >/dev/null; }

expr="$1"; shift

nix run --impure --expr "with import $DAPPTOOLS {}; $expr" -- "$@"
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" out -- "$@"
2 changes: 1 addition & 1 deletion src/seth/libexec/seth/seth---use
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ shift
[[ "$#" -gt 0 ]] || usage

if [[ -z "$bin" ]]; then
seth --nix-run "seth.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" out "$@"
seth --nix-run "seth.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" "$@"
else
set -e
SOLCBIN="$(realpath -e "${bin}")"
Expand Down

0 comments on commit 59afe3a

Please sign in to comment.