@@ -256,8 +256,16 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
nodeRuntimes = lib.mkOption {
|
nodeRuntimes = lib.mkOption {
|
||||||
type = with lib.types; nonEmptyListOf (enum [ "node20" ]);
|
type =
|
||||||
default = [ "node20" ];
|
with lib.types;
|
||||||
|
nonEmptyListOf (enum [
|
||||||
|
"node20"
|
||||||
|
"node24"
|
||||||
|
]);
|
||||||
|
default = [
|
||||||
|
"node20"
|
||||||
|
"node24"
|
||||||
|
];
|
||||||
description = ''
|
description = ''
|
||||||
List of Node.js runtimes the runner should support.
|
List of Node.js runtimes the runner should support.
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -16,12 +16,22 @@
|
|||||||
buildPackages,
|
buildPackages,
|
||||||
runtimeShell,
|
runtimeShell,
|
||||||
# List of Node.js runtimes the package should support
|
# List of Node.js runtimes the package should support
|
||||||
nodeRuntimes ? [ "node20" ],
|
nodeRuntimes ? [
|
||||||
|
"node20"
|
||||||
|
"node24"
|
||||||
|
],
|
||||||
nodejs_20,
|
nodejs_20,
|
||||||
|
nodejs_24,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Node.js runtimes supported by upstream
|
# Node.js runtimes supported by upstream
|
||||||
assert builtins.all (x: builtins.elem x [ "node20" ]) nodeRuntimes;
|
assert builtins.all (
|
||||||
|
x:
|
||||||
|
builtins.elem x [
|
||||||
|
"node20"
|
||||||
|
"node24"
|
||||||
|
]
|
||||||
|
) nodeRuntimes;
|
||||||
|
|
||||||
buildDotnetModule (finalAttrs: {
|
buildDotnetModule (finalAttrs: {
|
||||||
pname = "github-runner";
|
pname = "github-runner";
|
||||||
@@ -226,6 +236,9 @@ buildDotnetModule (finalAttrs: {
|
|||||||
''
|
''
|
||||||
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
|
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
|
||||||
ln -s ${nodejs_20} _layout/externals/node20
|
ln -s ${nodejs_20} _layout/externals/node20
|
||||||
|
''
|
||||||
|
+ lib.optionalString (lib.elem "node24" nodeRuntimes) ''
|
||||||
|
ln -s ${nodejs_24} _layout/externals/node24
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
@@ -268,6 +281,9 @@ buildDotnetModule (finalAttrs: {
|
|||||||
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
|
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
|
||||||
ln -s ${nodejs_20} $out/lib/externals/node20
|
ln -s ${nodejs_20} $out/lib/externals/node20
|
||||||
''
|
''
|
||||||
|
+ lib.optionalString (lib.elem "node24" nodeRuntimes) ''
|
||||||
|
ln -s ${nodejs_24} $out/lib/externals/node24
|
||||||
|
''
|
||||||
+ ''
|
+ ''
|
||||||
# Install Nodejs scripts called from workflows
|
# Install Nodejs scripts called from workflows
|
||||||
install -D src/Misc/layoutbin/hashFiles/index.js $out/lib/github-runner/hashFiles/index.js
|
install -D src/Misc/layoutbin/hashFiles/index.js $out/lib/github-runner/hashFiles/index.js
|
||||||
|
|||||||
Reference in New Issue
Block a user