github-runner: add support for node24

Fixes #434372

Changed files
+28 -4
nixos
modules
services
continuous-integration
github-runner
pkgs
by-name
gi
github-runner
+10 -2
nixos/modules/services/continuous-integration/github-runner/options.nix
···
};
nodeRuntimes = lib.mkOption {
-
type = with lib.types; nonEmptyListOf (enum [ "node20" ]);
-
default = [ "node20" ];
+
type =
+
with lib.types;
+
nonEmptyListOf (enum [
+
"node20"
+
"node24"
+
]);
+
default = [
+
"node20"
+
"node24"
+
];
description = ''
List of Node.js runtimes the runner should support.
'';
+18 -2
pkgs/by-name/gi/github-runner/package.nix
···
buildPackages,
runtimeShell,
# List of Node.js runtimes the package should support
-
nodeRuntimes ? [ "node20" ],
+
nodeRuntimes ? [
+
"node20"
+
"node24"
+
],
nodejs_20,
+
nodejs_24,
}:
# 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: {
pname = "github-runner";
···
''
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
ln -s ${nodejs_20} _layout/externals/node20
+
''
+
+ lib.optionalString (lib.elem "node24" nodeRuntimes) ''
+
ln -s ${nodejs_24} _layout/externals/node24
'';
postInstall = ''
···
''
+ lib.optionalString (lib.elem "node20" nodeRuntimes) ''
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