Consolidate per-package package-lock.json files into a single root-level workspace lockfile. Update all consumers: - Nix: shared src/npmDeps/npmDepsHash in lib.nix; devshell hook stamps package.json paths then runs npm ci from root; individual .nix files use mkNpmPassthru attrs instead of per-package fetchNpmDeps. - Python CLI: new _workspace_root() helper so _tui_need_npm_install, _make_tui_argv, _build_web_ui resolve lockfile/node_modules from the workspace root. - Desktop: replace --force-build/mtime heuristic with content-hash build stamp (_compute_desktop_content_hash via pathspec). Remove --force-build flag. - Dockerfile: single root npm install; no per-directory lockfile copies. - CI: nix-lockfile-fix and osv-scanner reference root package-lock.json; apps/dashboard → apps/desktop. - Tests: new test_tui_npm_install.py; desktop stamp tests in test_gui_command.py; updated assertions in test_cmd_update.py, test_web_ui_build.py, test_dockerfile_pid1_reaping.py. - Docs: remove --force-build from desktop flag table. Deleted: apps/desktop/package-lock.json, ui-tui/package-lock.json, ui-tui/packages/hermes-ink/package-lock.json, web/package-lock.json.
58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
# nix/packages.nix — Hermes Agent package built with uv2nix
|
|
{ inputs, ... }:
|
|
{
|
|
perSystem =
|
|
{ pkgs, lib, inputs', ... }:
|
|
let
|
|
hermesAgent = pkgs.callPackage ./hermes-agent.nix {
|
|
inherit (inputs) uv2nix pyproject-nix pyproject-build-systems;
|
|
npm-lockfile-fix = inputs'.npm-lockfile-fix.packages.default;
|
|
# Only embed clean revs — dirtyRev doesn't represent any upstream
|
|
# commit, so comparing it would always claim "update available".
|
|
rev = inputs.self.rev or null;
|
|
};
|
|
in
|
|
{
|
|
packages = {
|
|
default = hermesAgent;
|
|
|
|
# Ships discord.py + python-telegram-bot + slack-sdk so a plain
|
|
# `nix profile install .#messaging` connects to Discord/Telegram/Slack
|
|
# on first run — lazy-install can't write to the read-only /nix/store.
|
|
messaging = hermesAgent.override {
|
|
extraDependencyGroups = [ "messaging" ];
|
|
};
|
|
|
|
# All platform-portable optional integrations pre-built.
|
|
# matrix is Linux-only (oqs/liboqs lacks aarch64-darwin wheels).
|
|
full = hermesAgent.override {
|
|
extraDependencyGroups = [
|
|
"anthropic"
|
|
"azure-identity"
|
|
"bedrock"
|
|
"daytona"
|
|
"dingtalk"
|
|
"edge-tts"
|
|
"exa"
|
|
"fal"
|
|
"feishu"
|
|
"firecrawl"
|
|
"hindsight"
|
|
"honcho"
|
|
"messaging"
|
|
"modal"
|
|
"parallel-web"
|
|
"tts-premium"
|
|
"voice"
|
|
] ++ lib.optionals pkgs.stdenv.isLinux [ "matrix" ];
|
|
};
|
|
|
|
tui = hermesAgent.hermesTui;
|
|
web = hermesAgent.hermesWeb;
|
|
desktop = hermesAgent.hermesDesktop;
|
|
|
|
fix-lockfiles = hermesAgent.hermesNpmLib.mkFixLockfiles { attr = "tui"; };
|
|
};
|
|
};
|
|
}
|