The extra removal left CI, the Docker image and the nix package still
requesting `hindsight`. Once the extra is gone, `--extra hindsight` and
extraDependencyGroups = [ "hindsight" ] ask for something that no longer
exists. Drop them the same way 73c598e319 originally did: remove it from
the CI extras lists, the Docker sealed-venv build and the nix default
groups, and point the nix examples/check at honcho. Also remove the
stray blank line left in the exclude-newer table.
103 lines
3.3 KiB
Nix
103 lines
3.3 KiB
Nix
# nix/packages.nix — Hermes Agent package built with uv2nix
|
|
{ inputs, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
pkgs,
|
|
lib,
|
|
inputs',
|
|
...
|
|
}:
|
|
let
|
|
|
|
sandbox = pkgs.callPackage ./sandbox.nix { };
|
|
|
|
# pm/lock.json translated into derivations — one per tool package
|
|
# with an artifact for this system. The lockfile carries resolved
|
|
# urls + hashes, so nix consumes it as pure data. callPackage adds
|
|
# .override/.overrideDerivation to the returned SET; keep only the
|
|
# real derivations.
|
|
pmPackages = lib.filterAttrs (_: lib.isDerivation) (
|
|
pkgs.callPackage ./pm-packages.nix { }
|
|
);
|
|
|
|
dirtyRevision = inputs.self.dirtyRev or null;
|
|
# inputs.self.sourceInfo is a string (store path) in current Nix, not a
|
|
# record. The metadata fields are available as top-level attributes on
|
|
# inputs.self directly. A flake URL's requested ref is intentionally not
|
|
# exposed as self.ref after Nix resolves it to an immutable source, so
|
|
# branch is normally null for remote flakes. Preserve null rather than
|
|
# inventing a sentinel that could be a real branch name.
|
|
rev =
|
|
inputs.self.rev or (if dirtyRevision != null then builtins.substring 0 40 dirtyRevision else null);
|
|
rawRef = inputs.self.ref or null;
|
|
branch = if rawRef != null then builtins.replaceStrings [ "refs/heads/" ] [ "" ] rawRef else null;
|
|
dirty = dirtyRevision != null;
|
|
lastModified = inputs.self.lastModified or null;
|
|
minimal = pkgs.callPackage ./hermes-agent.nix {
|
|
inherit (inputs) uv2nix pyproject-nix pyproject-build-systems;
|
|
npm-lockfile-fix = inputs'.npm-lockfile-fix.packages.default;
|
|
inherit
|
|
rev
|
|
branch
|
|
dirty
|
|
lastModified
|
|
;
|
|
};
|
|
|
|
# All platform-portable optional integrations pre-built.
|
|
full = minimal.override {
|
|
extraDependencyGroups = [
|
|
"anthropic"
|
|
"azure-identity"
|
|
"bedrock"
|
|
"daytona"
|
|
"dingtalk"
|
|
"edge-tts"
|
|
"exa"
|
|
"fal"
|
|
"feishu"
|
|
"firecrawl"
|
|
"honcho"
|
|
"messaging"
|
|
"modal"
|
|
"parallel-web"
|
|
"tts-premium"
|
|
"vercel"
|
|
"voice"
|
|
]
|
|
# matrix is Linux-only (oqs/liboqs lacks aarch64-darwin wheels).
|
|
++ lib.optionals pkgs.stdenv.isLinux [ "matrix" ];
|
|
};
|
|
in
|
|
{
|
|
packages = {
|
|
node-gyp =
|
|
(pkgs.callPackage ./lib.nix {
|
|
inherit (pkgs) npm-lockfile-fix;
|
|
}).node-gyp;
|
|
default = full;
|
|
|
|
inherit sandbox;
|
|
|
|
inherit minimal;
|
|
|
|
# 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 = minimal.override {
|
|
extraDependencyGroups = [ "messaging" ];
|
|
};
|
|
|
|
tui = full.hermesTui;
|
|
web = full.hermesWeb;
|
|
desktop = full.hermesDesktop;
|
|
|
|
update-npm-lockfile = full.hermesNpmLib.updateNpmLockfile;
|
|
}
|
|
# Every pm lockfile tool as its own installable derivation:
|
|
# `nix build .#pm-ripgrep`, `nix build .#pm-gh`, ...
|
|
// lib.mapAttrs' (name: drv: lib.nameValuePair "pm-${name}" drv) pmPackages;
|
|
};
|
|
}
|