Merge pull request #415 from nix-community/no-grep

drop dependency on gnugrep
This commit is contained in:
mergify[bot] 2023-11-26 13:32:17 +00:00 committed by GitHub
commit 3bc5ef4363
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -7,8 +7,6 @@ stdenv.mkDerivation {
postPatch = ''
sed -i "2iNIX_BIN_PREFIX=${nix}/bin/" direnvrc
substituteInPlace direnvrc \
--replace "grep" "${gnugrep}/bin/grep"
'';
installPhase = ''

View file

@ -302,12 +302,14 @@ use_flake() {
local flake_input_paths
mkdir -p "$flake_inputs"
flake_input_paths=$("${NIX_BIN_PREFIX}nix" flake archive \
--json \
--json --no-write-lock-file \
--extra-experimental-features "nix-command flakes" \
--no-write-lock-file \
"$flake_dir" | grep -E -o '/nix/store/[^"]+')
for path in $flake_input_paths; do
_nix_add_gcroot "$path" "${flake_inputs}/${path##*/}"
"$flake_dir")
while [[ "$flake_input_paths" =~ /nix/store/[^\"]+ ]]; do
local store_path="${BASH_REMATCH[0]}"
_nix_add_gcroot "${store_path}" "${flake_inputs}/${store_path##*/}"
flake_input_paths="${flake_input_paths/${store_path}/}"
done
log_status "nix-direnv: renewed cache"