mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-16 14:41:24 +01:00
Run shellcheck on direnvrc during checkPhase
This commit is contained in:
parent
35dfac9604
commit
3f5f7a602d
2 changed files with 8 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
, re
|
, re
|
||||||
, reason
|
, reason
|
||||||
, sha
|
, sha
|
||||||
|
, shellcheck
|
||||||
, upx
|
, upx
|
||||||
,
|
,
|
||||||
}:
|
}:
|
||||||
|
|
@ -38,6 +39,9 @@ buildDunePackage {
|
||||||
# patchELF can't handle UPX'd binaries
|
# patchELF can't handle UPX'd binaries
|
||||||
# We produce a static OCaml binary that
|
# We produce a static OCaml binary that
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
postCheck = ''
|
||||||
|
${shellcheck}/bin/shellcheck direnvrc
|
||||||
|
'';
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace direnvrc --replace-fail "@flake_env@" "$out/bin/flake_env"
|
substituteInPlace direnvrc --replace-fail "@flake_env@" "$out/bin/flake_env"
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
5
direnvrc
5
direnvrc
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# The below code is taken largely from nix-direnv.
|
# The below code is taken largely from nix-direnv.
|
||||||
# nix-direnv's license is replicated below:
|
# nix-direnv's license is replicated below:
|
||||||
#
|
#
|
||||||
|
|
@ -38,7 +40,8 @@ use_flake_env() {
|
||||||
local old_tempdir=${TEMPDIR:-__UNSET__}
|
local old_tempdir=${TEMPDIR:-__UNSET__}
|
||||||
local old_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
local old_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
||||||
|
|
||||||
local ld=$(direnv_layout_dir)
|
local ld
|
||||||
|
ld=$(direnv_layout_dir)
|
||||||
export direnv
|
export direnv
|
||||||
|
|
||||||
local flake_reference="${1:-"."}"
|
local flake_reference="${1:-"."}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue