mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-09 03:56:10 +01:00
drop dependency on gnugrep
This commit is contained in:
parent
7a472ecec6
commit
bcba9830e4
2 changed files with 7 additions and 7 deletions
|
|
@ -7,8 +7,6 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i "2iNIX_BIN_PREFIX=${nix}/bin/" direnvrc
|
sed -i "2iNIX_BIN_PREFIX=${nix}/bin/" direnvrc
|
||||||
substituteInPlace direnvrc \
|
|
||||||
--replace "grep" "${gnugrep}/bin/grep"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
||||||
12
direnvrc
12
direnvrc
|
|
@ -280,12 +280,14 @@ use_flake() {
|
||||||
local flake_input_paths
|
local flake_input_paths
|
||||||
mkdir -p "$flake_inputs"
|
mkdir -p "$flake_inputs"
|
||||||
flake_input_paths=$("${NIX_BIN_PREFIX}nix" flake archive \
|
flake_input_paths=$("${NIX_BIN_PREFIX}nix" flake archive \
|
||||||
--json \
|
--json --no-write-lock-file \
|
||||||
--extra-experimental-features "nix-command flakes" \
|
--extra-experimental-features "nix-command flakes" \
|
||||||
--no-write-lock-file \
|
"$flake_dir")
|
||||||
"$flake_dir" | grep -E -o '/nix/store/[^"]+')
|
|
||||||
for path in $flake_input_paths; do
|
while [[ "$flake_input_paths" =~ /nix/store/[^\"]+ ]]; do
|
||||||
_nix_add_gcroot "$path" "${flake_inputs}/${path##*/}"
|
local store_path="${BASH_REMATCH[0]}"
|
||||||
|
_nix_add_gcroot "${store_path}" "${flake_inputs}/${store_path##*/}"
|
||||||
|
flake_input_paths="${flake_input_paths/${store_path}/}"
|
||||||
done
|
done
|
||||||
|
|
||||||
log_status "nix-direnv: renewed cache"
|
log_status "nix-direnv: renewed cache"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue