mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 05:00:19 +00:00
nixos/github-runners: only override pkg if it has a nodeRuntimes
arg
Older versions of the github-runner package might not have the `nodeRuntimes` argument yet causing an error as the NixOS module always tries to override the argument. The commit makes sure we only override `nodeRuntimes` if the configured package has a `nodeRuntimes` argument.
This commit is contained in:
parent
b7b83160f9
commit
e6854b295b
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user