Implement runtime priorities
This commit is contained in:
parent
4470eb637f
commit
b50af13787
|
@ -43,7 +43,22 @@ expressWs(app);
|
||||||
`nix eval --json ${config.flake_path}#pistonRuntimeSets.${config.runtime_set} --apply builtins.attrNames`
|
`nix eval --json ${config.flake_path}#pistonRuntimeSets.${config.runtime_set} --apply builtins.attrNames`
|
||||||
)
|
)
|
||||||
.toString();
|
.toString();
|
||||||
const runtime_names = JSON.parse(runtimes_data);
|
const runtime_names_unordered = JSON.parse(runtimes_data);
|
||||||
|
|
||||||
|
const priorities_data = cp
|
||||||
|
.execSync(
|
||||||
|
`nix eval --json ${config.flake_path}#pistonRuntimePriorities`
|
||||||
|
)
|
||||||
|
.toString();
|
||||||
|
const priorities = JSON.parse(priorities_data).filter(runtime =>
|
||||||
|
runtime_names_unordered.includes(runtime)
|
||||||
|
);
|
||||||
|
const runtime_names = [
|
||||||
|
...priorities,
|
||||||
|
...runtime_names_unordered.filter(
|
||||||
|
runtime => !priorities.includes(runtime)
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
logger.info('Loading the runtimes from the flakes');
|
logger.info('Loading the runtimes from the flakes');
|
||||||
const runtimes = runtime_names.map(runtime_name => {
|
const runtimes = runtime_names.map(runtime_name => {
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
"bash-only" = runtimeList ["bash"];
|
"bash-only" = runtimeList ["bash"];
|
||||||
"none" = { };
|
"none" = { };
|
||||||
};
|
};
|
||||||
|
pistonRuntimePriorities = import ./runtimes/priorities;
|
||||||
|
|
||||||
legacyPackages."${system}" = rec {
|
legacyPackages."${system}" = rec {
|
||||||
nosocket = (import ./nosocket { inherit pkgs; }).package;
|
nosocket = (import ./nosocket { inherit pkgs; }).package;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
"node-javascript"
|
"node-javascript"
|
||||||
"python2"
|
|
||||||
"python3"
|
"python3"
|
||||||
|
"python2"
|
||||||
"bash"
|
"bash"
|
||||||
"clojure"
|
"clojure"
|
||||||
"cobol-gnu-cobol"
|
"cobol-gnu-cobol"
|
||||||
|
|
Loading…
Reference in New Issue