feat: inline plugin eval into config-options check
- evaluate first-party plugins inside config-options check - keep garnix matrix unchanged by removing standalone check - update steipete tools pin to 76188dc Tests: not run (CI pending)
This commit is contained in:
parent
bbca1fc02c
commit
d61564a8a5
@ -48,7 +48,6 @@
|
||||
|
||||
checks = {
|
||||
gateway = packageSetStable.openclaw-gateway;
|
||||
first-party-plugins = pkgs.callPackage ./nix/checks/openclaw-first-party-plugins.nix {};
|
||||
} // (if pkgs.stdenv.hostPlatform.isLinux then {
|
||||
gateway-tests = pkgs.callPackage ./nix/checks/openclaw-gateway-tests.nix {
|
||||
sourceInfo = sourceInfoStable;
|
||||
|
||||
@ -8,8 +8,6 @@ builds:
|
||||
- "packages.x86_64-linux.openclaw-gateway"
|
||||
- "packages.x86_64-linux.openclaw-tools"
|
||||
- "checks.aarch64-darwin.gateway"
|
||||
- "checks.aarch64-darwin.first-party-plugins"
|
||||
- "checks.x86_64-linux.gateway"
|
||||
- "checks.x86_64-linux.first-party-plugins"
|
||||
- "checks.x86_64-linux.gateway-tests"
|
||||
- "checks.x86_64-linux.config-options"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
@ -15,6 +16,83 @@
|
||||
}:
|
||||
|
||||
let
|
||||
linuxFirstParty = [
|
||||
"summarize"
|
||||
"gogcli"
|
||||
"camsnap"
|
||||
"sonoscli"
|
||||
"sag"
|
||||
"oracle"
|
||||
];
|
||||
enableFirstParty = name: stdenv.hostPlatform.isDarwin || lib.elem name linuxFirstParty;
|
||||
|
||||
stubModule = { lib, ... }: {
|
||||
options = {
|
||||
assertions = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
};
|
||||
|
||||
home.homeDirectory = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/tmp";
|
||||
};
|
||||
|
||||
home.packages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.anything;
|
||||
default = [];
|
||||
};
|
||||
|
||||
home.file = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
home.activation = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
launchd.agents = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
systemd.user.services = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
programs.git.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pluginEval = lib.evalModules {
|
||||
modules = [
|
||||
stubModule
|
||||
../modules/home-manager/openclaw.nix
|
||||
({ lib, options, ... }: {
|
||||
config = {
|
||||
home.homeDirectory = "/tmp";
|
||||
programs.git.enable = false;
|
||||
programs.openclaw = {
|
||||
enable = true;
|
||||
launchd.enable = false;
|
||||
systemd.enable = false;
|
||||
instances.default = {};
|
||||
firstParty = lib.mapAttrs (name: _: { enable = enableFirstParty name; }) options.programs.openclaw.firstParty;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
specialArgs = { inherit pkgs; };
|
||||
};
|
||||
|
||||
pluginEvalKey = builtins.deepSeq pluginEval.config.assertions "ok";
|
||||
|
||||
sourceFetch = lib.removeAttrs sourceInfo [ "pnpmDepsHash" ];
|
||||
pnpmPlatform = if stdenv.hostPlatform.isDarwin then "darwin" else "linux";
|
||||
pnpmArch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x64";
|
||||
@ -75,6 +153,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
CONFIG_OPTIONS_GENERATOR = "${../scripts/generate-config-options.ts}";
|
||||
CONFIG_OPTIONS_GOLDEN = "${../generated/openclaw-config-options.nix}";
|
||||
NODE_ENGINE_CHECK = "${../scripts/check-node-engine.ts}";
|
||||
OPENCLAW_PLUGIN_EVAL = pluginEvalKey;
|
||||
};
|
||||
|
||||
buildPhase = "${../scripts/gateway-tests-build.sh}";
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
{ lib, pkgs }:
|
||||
|
||||
let
|
||||
stubModule = { lib, ... }: {
|
||||
options = {
|
||||
assertions = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
default = [];
|
||||
};
|
||||
|
||||
home.homeDirectory = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/tmp";
|
||||
};
|
||||
|
||||
home.packages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.anything;
|
||||
default = [];
|
||||
};
|
||||
|
||||
home.file = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
home.activation = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
launchd.agents = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
systemd.user.services = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
programs.git.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
stubModule
|
||||
../modules/home-manager/openclaw.nix
|
||||
({ lib, options, ... }: {
|
||||
config = {
|
||||
home.homeDirectory = "/tmp";
|
||||
programs.git.enable = false;
|
||||
programs.openclaw = {
|
||||
enable = true;
|
||||
launchd.enable = false;
|
||||
systemd.enable = false;
|
||||
instances.default = {};
|
||||
firstParty = lib.mapAttrs (_: _: { enable = true; }) options.programs.openclaw.firstParty;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
specialArgs = { inherit pkgs; };
|
||||
};
|
||||
evalKey = builtins.deepSeq eval.config.assertions "ok";
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "openclaw-first-party-plugins-${evalKey}";
|
||||
dontUnpack = true;
|
||||
installPhase = "${../scripts/empty-install.sh}";
|
||||
}
|
||||
@ -54,8 +54,8 @@ let
|
||||
};
|
||||
|
||||
firstPartySources = let
|
||||
stepieteRev = "dbf0a31a57407d9140e32357ea8d0215bd9feed9";
|
||||
stepieteNarHash = "sha256-QkPl/Rgk9DXgaVNhjvHHHjy5e81j+MzcVOouZRdUTLA=";
|
||||
stepieteRev = "76188dc559493e752f23a53d4563b77dea7c0428";
|
||||
stepieteNarHash = "sha256-MlQ4G7MIkFDIvekIiucJEZP0FmeyOpwadI1dCq0EmSk=";
|
||||
stepiete = tool:
|
||||
"github:openclaw/nix-steipete-tools?dir=tools/${tool}&rev=${stepieteRev}&narHash=${stepieteNarHash}";
|
||||
in {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user