Skip to content

Commit

Permalink
rely on function autocalling
Browse files Browse the repository at this point in the history
Instead of the current behavior of always trying to call the expression
as a function, or alternatively, trying to implement autocalling
manually with `builtins.isFunction`.
  • Loading branch information
CobaltCause authored and mergify[bot] committed Feb 15, 2025
1 parent 3888383 commit 2e82170
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions direnvrc
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,9 @@ use_nix() {
if [[ -n $packages ]]; then
extra_args+=("--expr" "with import <nixpkgs> {}; mkShell { buildInputs = [ $packages ]; }")
else
# figure out what attribute we should build
if [[ -z $attribute ]]; then
extra_args+=("--file" "$nixfile")
else
extra_args+=("--expr" "(import ${nixfile} {}).${attribute}")
extra_args+=("--file" "$nixfile")
if [[ -n $attribute ]]; then
extra_args+=("$attribute")
fi
fi

Expand Down

0 comments on commit 2e82170

Please sign in to comment.