nix: add postgrest-ctags command

Generates ctags for Haskell and Python code.
This commit is contained in:
steve-chavez
2024-05-08 12:27:26 -05:00
committed by Steve Chavez
parent 1b584f7e9c
commit f9e9740999
+15 -1
View File
@@ -13,6 +13,8 @@
, style , style
, tests , tests
, withTools , withTools
, haskellPackages
, ctags
}: }:
let let
watch = watch =
@@ -292,7 +294,7 @@ let
parallelCurl = parallelCurl =
checkedShellScript checkedShellScript
{ {
name = "parallel-curl"; name = "postgrest-parallel-curl";
docs = "wrapper for using <num> parallel curl requests on the same <host>"; docs = "wrapper for using <num> parallel curl requests on the same <host>";
args = [ args = [
"ARG_POSITIONAL_SINGLE([num], [number of parallel requests])" "ARG_POSITIONAL_SINGLE([num], [number of parallel requests])"
@@ -314,6 +316,17 @@ let
eval "$curl_command" eval "$curl_command"
''; '';
genCtags =
checkedShellScript
{
name = "postgrest-ctags";
docs = "Generate ctags for Haskell and Python code";
workingDir = "/";
}
''
${ctags}/bin/ctags -a -R --fields=+l --languages=python --python-kinds=-iv -f ./tags test/io/
${haskellPackages.hasktags}/bin/hasktags -a -R -c -f ./tags .
'';
in in
buildToolbox buildToolbox
{ {
@@ -327,6 +340,7 @@ buildToolbox
hsieGraphSymbols hsieGraphSymbols
hsieMinimalImports hsieMinimalImports
parallelCurl parallelCurl
genCtags
pushCachix pushCachix
watch; watch;
}; };