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