From 59afe3a780626fd2db7bc75fdda2ae8b78b92aac Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Tue, 28 Mar 2023 21:13:31 +0200 Subject: [PATCH] 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. --- src/dapp/libexec/dapp/dapp---nix-run | 2 +- src/dapp/libexec/dapp/dapp---use | 2 +- src/seth/libexec/seth/seth---nix-run | 2 +- src/seth/libexec/seth/seth---use | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dapp/libexec/dapp/dapp---nix-run b/src/dapp/libexec/dapp/dapp---nix-run index e72c1d8a1..d302b10e2 100755 --- a/src/dapp/libexec/dapp/dapp---nix-run +++ b/src/dapp/libexec/dapp/dapp---nix-run @@ -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 -- "$@" diff --git a/src/dapp/libexec/dapp/dapp---use b/src/dapp/libexec/dapp/dapp---use index df942332d..9dad6291a 100755 --- a/src/dapp/libexec/dapp/dapp---use +++ b/src/dapp/libexec/dapp/dapp---use @@ -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}")" diff --git a/src/seth/libexec/seth/seth---nix-run b/src/seth/libexec/seth/seth---nix-run index 2ec8a965a..d47809782 100755 --- a/src/seth/libexec/seth/seth---nix-run +++ b/src/seth/libexec/seth/seth---nix-run @@ -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 -- "$@" diff --git a/src/seth/libexec/seth/seth---use b/src/seth/libexec/seth/seth---use index 5fb83c821..9c70bb446 100755 --- a/src/seth/libexec/seth/seth---use +++ b/src/seth/libexec/seth/seth---use @@ -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}")"