nix: Export all tools on each toolbox
This allows targeting each tool separately for installs.
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
, extra ? { }
|
||||
}:
|
||||
let
|
||||
bash-completion = builtins.map (tool: tool.bash-completion) tools;
|
||||
bash-completion = builtins.map (tool: (builtins.getAttr tool tools).bash-completion) (builtins.attrNames tools);
|
||||
|
||||
env = buildEnv {
|
||||
inherit name;
|
||||
paths = builtins.map (tool: tool.bin) tools;
|
||||
paths = builtins.map (tool: (builtins.getAttr tool tools).bin) (builtins.attrNames tools);
|
||||
};
|
||||
|
||||
in
|
||||
env // { inherit bash-completion; } // extra
|
||||
env // tools // { inherit bash-completion; } // extra
|
||||
|
||||
@@ -73,10 +73,11 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-cabal";
|
||||
tools = [
|
||||
build
|
||||
clean
|
||||
run
|
||||
repl
|
||||
];
|
||||
tools = {
|
||||
inherit
|
||||
build
|
||||
clean
|
||||
run
|
||||
repl;
|
||||
};
|
||||
}
|
||||
|
||||
+12
-12
@@ -316,16 +316,16 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-dev";
|
||||
tools = [
|
||||
check
|
||||
dumpMinimalImports
|
||||
gitHooks
|
||||
hsieGraphModules
|
||||
hsieGraphSymbols
|
||||
hsieMinimalImports
|
||||
parallelCurl
|
||||
pushCachix
|
||||
watch
|
||||
];
|
||||
extra = { inherit pushCachix; };
|
||||
tools = {
|
||||
inherit
|
||||
check
|
||||
dumpMinimalImports
|
||||
gitHooks
|
||||
hsieGraphModules
|
||||
hsieGraphSymbols
|
||||
hsieMinimalImports
|
||||
parallelCurl
|
||||
pushCachix
|
||||
watch;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-docker";
|
||||
tools = [ load ];
|
||||
extra = {
|
||||
inherit image;
|
||||
};
|
||||
tools = { inherit load; };
|
||||
extra = { inherit image; };
|
||||
}
|
||||
|
||||
+4
-4
@@ -174,14 +174,14 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-docs";
|
||||
tools =
|
||||
[
|
||||
tools = {
|
||||
inherit
|
||||
build
|
||||
check
|
||||
dictcheck
|
||||
linkcheck
|
||||
render
|
||||
serve
|
||||
spellcheck
|
||||
];
|
||||
spellcheck;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -181,5 +181,5 @@ let
|
||||
in
|
||||
buildToolbox {
|
||||
name = "postgrest-loadtest";
|
||||
tools = [ loadtest loadtestAgainst report ];
|
||||
tools = { inherit loadtest loadtestAgainst report; };
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-memory";
|
||||
tools = [ test ];
|
||||
tools = { inherit test; };
|
||||
}
|
||||
|
||||
@@ -51,5 +51,5 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-nixpkgs";
|
||||
tools = [ upgrade ];
|
||||
tools = { inherit upgrade; };
|
||||
}
|
||||
|
||||
@@ -133,5 +133,5 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-release";
|
||||
tools = [ dockerHubDescription release ];
|
||||
tools = { inherit dockerHubDescription release; };
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,5 +81,5 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-style";
|
||||
tools = [ style styleCheck lint ];
|
||||
tools = { inherit style styleCheck lint; };
|
||||
}
|
||||
|
||||
+4
-4
@@ -193,14 +193,14 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-tests";
|
||||
tools =
|
||||
[
|
||||
tools = {
|
||||
inherit
|
||||
testSpec
|
||||
testDoctests
|
||||
testSpecIdempotence
|
||||
testIO
|
||||
dumpSchema
|
||||
coverage
|
||||
coverageDraftOverlay
|
||||
];
|
||||
coverageDraftOverlay;
|
||||
};
|
||||
}
|
||||
|
||||
+14
-7
@@ -139,10 +139,7 @@ let
|
||||
}
|
||||
(lib.concatStringsSep "\n\n" runners);
|
||||
|
||||
# Create a `postgrest-with-postgresql-` for each PostgreSQL version
|
||||
withPgVersions = builtins.map withTmpDb postgresqlVersions;
|
||||
|
||||
withPg = builtins.head withPgVersions;
|
||||
withPg = withTmpDb (builtins.head postgresqlVersions);
|
||||
|
||||
withSlowPg =
|
||||
checkedShellScript
|
||||
@@ -353,7 +350,17 @@ in
|
||||
buildToolbox
|
||||
{
|
||||
name = "postgrest-with";
|
||||
tools = [ withPgAll withGit withPgrst withSlowPg withSlowPgrst ] ++ withPgVersions;
|
||||
# make withTools available for other nix files
|
||||
extra = { inherit withGit withPg withPgAll withPgrst withSlowPg withSlowPgrst; };
|
||||
tools = {
|
||||
inherit
|
||||
withGit
|
||||
withPgAll
|
||||
withPgrst
|
||||
withSlowPg
|
||||
withSlowPgrst;
|
||||
} // builtins.listToAttrs (
|
||||
# Create a `postgrest-with-postgresql-` for each PostgreSQL version
|
||||
builtins.map (pg: { inherit (pg) name; value = withTmpDb pg; }) postgresqlVersions
|
||||
);
|
||||
# make latest withPg available for other nix files
|
||||
extra = { inherit withPg; };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user