nix: Refactor checkedShellScript's inRootDir to workingDir

This allows more flexible control over the working directory. Values for workingDir must always start
with a / and will then be relative to the repo root.
This commit is contained in:
Wolfgang Walther
2024-02-18 13:10:00 +01:00
committed by Wolfgang Walther
parent 75a86ba873
commit e110fdbd2c
10 changed files with 37 additions and 34 deletions
+5 -5
View File
@@ -34,7 +34,7 @@ let
];
positionalCompletion = "_command";
redirectTixFiles = false; # will be done by sub-command
inRootDir = true;
workingDir = "/";
}
''
while true; do
@@ -51,7 +51,7 @@ let
Requires authentication with `cachix authtoken ...`.
'';
inRootDir = true;
workingDir = "/";
}
''
${nix}/bin/nix-instantiate \
@@ -71,7 +71,7 @@ let
This currently excludes the memory and spec-idempotence tests,
as those are particularly expensive.
'';
inRootDir = true;
workingDir = "/";
}
''
${tests}/bin/postgrest-test-spec
@@ -126,7 +126,7 @@ let
COMPREPLY=( $(compgen -W "basic full" -- "$cur") )
fi
'';
inRootDir = true;
workingDir = "/";
}
''
if [ run != "$_arg_operation" ]; then
@@ -237,7 +237,7 @@ let
name = "postgrest-dump-minimal-imports";
docs = "Dump minimal imports into given directory.";
args = [ "ARG_POSITIONAL_SINGLE([dumpdir], [Output directory])" ];
inRootDir = true;
workingDir = "/";
withTmpDir = true;
}
''