summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2024-02-28 13:16:23 -0500
committerGitHub <noreply@github.com>2024-02-28 13:16:23 -0500
commit4b0a521b248f02e4707473d1711779e01af7c588 (patch)
treec3bf3cd0e15fefce3c2ba7a0e575a47080d4759f
parentMerge pull request #292112 from NixOS/backport-292056-to-release-23.11 (diff)
parentnixos/github-runners: only override pkg if it has a `nodeRuntimes` arg (diff)
downloadnixpkgs-4b0a521b248f02e4707473d1711779e01af7c588.tar.gz
Merge pull request #287264 from NixOS/backport-286063-to-release-23.11
[Backport release-23.11] nixos/github-runners: only override pkg if it has a `nodeRuntimes` arg
-rw-r--r--nixos/modules/services/continuous-integration/github-runner/service.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/github-runner/service.nix b/nixos/modules/services/continuous-integration/github-runner/service.nix
index 535df7f68e07..784aea0edea7 100644
--- a/nixos/modules/services/continuous-integration/github-runner/service.nix
+++ b/nixos/modules/services/continuous-integration/github-runner/service.nix
@@ -22,7 +22,8 @@ with lib;
let
workDir = if cfg.workDir == null then runtimeDir else cfg.workDir;
- package = cfg.package.override { inherit (cfg) nodeRuntimes; };
+ # Support old github-runner versions which don't have the `nodeRuntimes` arg yet.
+ package = cfg.package.override (old: optionalAttrs (hasAttr "nodeRuntimes" old) { inherit (cfg) nodeRuntimes; });
in
{
description = "GitHub Actions runner";