nix(refactor): Add buildToolbox to streamline module interface towards shell.nix

This commit is contained in:
Wolfgang Walther
2021-04-18 13:51:39 +02:00
committed by Wolfgang Walther
parent de73ced34a
commit fe497fc438
13 changed files with 94 additions and 91 deletions
+6 -16
View File
@@ -1,6 +1,4 @@
# Utilities for running the PostgREST test suite
{ buildEnv
{ buildToolbox
, cabal-install
, checkedShellScript
, devCabalOptions
@@ -156,6 +154,10 @@ let
sed -i 's|^module \(.*\):|module \1/|g' test/coverage.overlay
'';
in
buildToolbox
{
name = "postgrest-tests";
tools =
[
testSpec
@@ -165,16 +167,4 @@ let
coverage
coverageDraftOverlay
];
bashCompletion = builtins.map (tool: tool.bashCompletion) tools;
in
# Create an environment that contains all the utility scripts for running tests
# that we defined above.
buildEnv
{
name =
"postgrest-tests";
paths = builtins.map (tool: tool.bin) tools;
} // { inherit bashCompletion; }
}