Skip to content

Commit 59afe3a

Browse files
committed
dapp/seth: fix --use and --nix-use
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.
1 parent 79d6c11 commit 59afe3a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/dapp/libexec/dapp/dapp---nix-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ have() { command -v "$1" >/dev/null; }
1616

1717
expr="$1"; shift
1818

19-
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" -- "$@"
19+
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" out -- "$@"

src/dapp/libexec/dapp/dapp---use

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ shift
5959
[[ "$#" -gt 0 ]] || usage
6060

6161
if [[ -z "$bin" ]]; then
62-
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 "$@"
62+
dapp --nix-run "dapp.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" "$@"
6363
else
6464
set -e
6565
SOLCBIN="$(realpath -e "${bin}")"

src/seth/libexec/seth/seth---nix-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ have() { command -v "$1" >/dev/null; }
1616

1717
expr="$1"; shift
1818

19-
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" -- "$@"
19+
nix run --impure --expr "with import $DAPPTOOLS {}; $expr" out -- "$@"

src/seth/libexec/seth/seth---use

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ shift
5656
[[ "$#" -gt 0 ]] || usage
5757

5858
if [[ -z "$bin" ]]; then
59-
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 "$@"
59+
seth --nix-run "seth.override {solc = pkgs.runCommand \"solc\" { } \"mkdir -p \$out/bin; ln -s \${solc-static-versions.${solc//[-.]/_}}/bin/${solc} \$out/bin/solc\";}" "$@"
6060
else
6161
set -e
6262
SOLCBIN="$(realpath -e "${bin}")"

0 commit comments

Comments
 (0)