nix: replace silver-searcher with fd

The former has been removed from Nixpkgs and won't be available on the
next bump.
This commit is contained in:
Wolfgang Walther
2026-06-05 20:29:48 +00:00
parent da8738b88e
commit b114bb9395
4 changed files with 9 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
.git
+2
View File
@@ -27,3 +27,5 @@ loadtest
gen_targets.http gen_targets.http
gen_jwk.json gen_jwk.json
gen_private.json gen_private.json
.pytest_cache
.ruff_cache
+2 -2
View File
@@ -5,11 +5,11 @@
, curl , curl
, devCabalOptions , devCabalOptions
, entr , entr
, fd
, git , git
, graphviz , graphviz
, hsie , hsie
, nix , nix
, silver-searcher
, stdenv , stdenv
, style , style
, tests , tests
@@ -41,7 +41,7 @@ let
} }
'' ''
while true; do while true; do
(! ${silver-searcher}/bin/ag -l . | ${entr}/bin/entr -dr "$_arg_command" "''${_arg_leftovers[@]}") (! ${fd}/bin/fd -H | ${entr}/bin/entr -dr "$_arg_command" "''${_arg_leftovers[@]}")
done done
''; '';
+4 -6
View File
@@ -3,13 +3,13 @@
, buildToolbox , buildToolbox
, checkedShellScript , checkedShellScript
, deadnix , deadnix
, fd
, git , git
, hlint , hlint
, hsie , hsie
, nixpkgs-fmt , nixpkgs-fmt
, python3Packages , python3Packages
, ruff , ruff
, silver-searcher
, statix , statix
, stylish-haskell , stylish-haskell
, writeText , writeText
@@ -28,8 +28,7 @@ let
${nixpkgs-fmt}/bin/nixpkgs-fmt . > /dev/null 2> /dev/null ${nixpkgs-fmt}/bin/nixpkgs-fmt . > /dev/null 2> /dev/null
# Format Haskell files # Format Haskell files
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753 ${fd}/bin/fd '\.l?hs$' \
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
| xargs ${stylish-haskell}/bin/stylish-haskell -i | xargs ${stylish-haskell}/bin/stylish-haskell -i
# Format Python files # Format Python files
@@ -82,7 +81,7 @@ let
# ruff has gaps in scanning for unused code, so we use vulture # ruff has gaps in scanning for unused code, so we use vulture
echo "Scanning python files for unused code..." echo "Scanning python files for unused code..."
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?py$' . \ ${fd}/bin/fd '\.l?py$' \
| xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py --min-confidence 80 | xargs ${python3Packages.vulture}/bin/vulture --exclude docs/conf.py --min-confidence 80
echo "Linting python files..." echo "Linting python files..."
@@ -92,8 +91,7 @@ let
${hsie} check-aliases main src ${hsie} check-aliases main src
echo "Linting Haskell files..." echo "Linting Haskell files..."
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753 ${fd}/bin/fd '\.l?hs$' \
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
| xargs ${hlint}/bin/hlint --hint=${hlintConfig} | xargs ${hlint}/bin/hlint --hint=${hlintConfig}
''; '';