diff --git a/default.nix b/default.nix index 10fc287..9f3d381 100644 --- a/default.nix +++ b/default.nix @@ -11,6 +11,7 @@ , re , reason , sha +, shellcheck , upx , }: @@ -38,6 +39,9 @@ buildDunePackage { # patchELF can't handle UPX'd binaries # We produce a static OCaml binary that dontPatchELF = true; + postCheck = '' + ${shellcheck}/bin/shellcheck direnvrc + ''; postPatch = '' substituteInPlace direnvrc --replace-fail "@flake_env@" "$out/bin/flake_env" ''; diff --git a/direnvrc b/direnvrc index 5103249..64ddcfd 100644 --- a/direnvrc +++ b/direnvrc @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # The below code is taken largely from nix-direnv. # nix-direnv's license is replicated below: # @@ -38,7 +40,8 @@ use_flake_env() { local old_tempdir=${TEMPDIR:-__UNSET__} local old_xdg_data_dirs=${XDG_DATA_DIRS:-} - local ld=$(direnv_layout_dir) + local ld + ld=$(direnv_layout_dir) export direnv local flake_reference="${1:-"."}"